void testSchemaFileMustExist() throws Exception { expectBuildExceptionContaining("testSchemaFileMustExist", "expected failure", WsdlToDotnet.Schema.ERROR_FILE_NOT_FOUND); } /** * A unit test for JUnit */ public void testSchemaFileMustHaveOneOptionOnly() throws Exception { expectBuildExceptionContaining("testSchemaFileMustHaveOneOptionOnly", "expected failure", WsdlToDotnet.Schema.ERROR_BOTH_DECLARED); } /** * A unit test for JUnit */ public void testSchemaMustBeSet() throws Exception { expectBuildExceptionContaining("testSchemaMustBeSet", "expected failure", WsdlToDotnet.Schema.ERROR_NONE_DECLARED);
void testNoEmptySchemaNamespace() throws Exception { expectBuildExceptionContaining("testNoEmptySchemaNamespace", "empty namespace URI",SchemaValidate.SchemaLocation.ERROR_NO_URI); } public void testNoEmptySchemaLocation() throws Exception { expectBuildExceptionContaining("testNoEmptySchemaLocation", "empty schema location", SchemaValidate.SchemaLocation.ERROR_NO_LOCATION); } public void testNoFile() throws Exception { expectBuildExceptionContaining("testNoFile", "no file at file attribute", SchemaValidate.SchemaLocation.ERROR_NO_FILE);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/WsdlToDotnetTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/SchemaValidateTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testSchemaFileMustExist() throws Exception {
1
void testNoEmptySchemaNamespace() throws Exception {
2
        expectBuildExceptionContaining("testSchemaFileMustExist",
2
        expectBuildExceptionContaining("test
3
                "expected failure",
4
                WsdlToDotnet.Schema
3
NoEmptySchemaNamespace",
5
.ERROR_FILE_NOT_FOUND);
4
                "empty namespace URI",SchemaValidate.SchemaLocation.ERROR_
6
    }
7
    /**
8
     * A unit test for JUnit
9
     */
10
    public void testSchemaFileMustHaveOneOptionOnly
5
NO_URI);
6
    }
11
() throws Exception {
7
    public void testNoEmptySchemaLocation() throws Exception {
12
        expectBuildExceptionContaining("testSchemaFileMustHaveOneOptionOnly",
8
        expectBuildExceptionContaining("testNoEmptySchemaLocation",
13
                "expected failure",
9
                "e
14
                WsdlToDotnet.Schema.ERROR_BOTH_DECLARED);
15
    }
16
    /**
17
     * A unit test for JUnit
18
     */
10
mpty schema location",
11
                SchemaValidate.SchemaLocation.ERROR_NO_LOCATION);
12
    }
19
    public void testSchemaMustBeSet() throws Exception {
13
    public void testNoFile() throws Exception {
20
        expectBuildExceptionContaining("testSchemaMustBeSet",
14
        expectBuildExceptionContaining("testNoFile",
21
                "expected failure",
15
                "no file at file attribute",
22
                WsdlToDotnet.Schema.ERROR_NONE_DECLARED);
16
                SchemaValidate.SchemaLocation.ERROR_NO_FILE);
23
    
17
    
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0