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 testNoFile() throws Exception { expectBuildExceptionContaining("testNoFile", "no file at file attribute", SchemaValidate.SchemaLocation.ERROR_NO_FILE); } public void testNoDoubleSchemaLocation() throws Exception { expectBuildExceptionContaining("testNoDoubleSchemaLocation", "two locations for schemas", SchemaValidate.SchemaLocation.ERROR_TWO_LOCATIONS); } public void testNoDuplicateSchema() throws Exception { expectBuildExceptionContaining("testNoDuplicateSchema", "duplicate schemas with different values", SchemaValidate.ERROR_DUPLICATE_SCHEMA);
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 testNoFile() throws Exception {
2
        expectBuildExceptionContaining("testSchemaFileMustExist",
2
        expectBuildExceptionContaining("testNoFile",
3
                "expected failure",
3
                "no file at file attribute",
4
                WsdlToDotnet.Schema.ERROR_FILE_NOT_FOUND);
4
                SchemaValidate.SchemaLocation.ERROR_NO_FILE);
5
    }
5
    }
6
    /**
6
    
7
     * A unit test for JUnit
8
     */
9
    public void testSchemaFileMustHaveOneOptionOnly() throws Exception {
7
public void testNoDoubleSchemaLocation() throws Exception {
10
        expectBuildExceptionContaining("testSchemaFileMustHaveOneOptionOnly",
8
        expectBuildExceptionContaining("test
11
                "expected failure",
12
                WsdlToDotnet.Schema.ERROR_BOTH_DECLARED);
13
    }
14
    /**
15
     * A unit test for JUnit
16
     */
9
NoDoubleSchemaLocation",
10
                "two locations for schemas",
11
                SchemaValidate.SchemaLocation.ERROR_TWO_LOCATIONS);
12
    }
17
    public void testSchemaMustBeSet() throws Exception {
13
    public void testNoDuplicateSchema() throws Exception {
18
        expectBuildExceptionContaining("testSchemaMustBeSet",
14
        expectBuildExceptionContaining("testNoDuplicateSchema",
19
                "expected failure",
15
                "
20
                WsdlToDotnet.Schema.ERROR_NONE_DECLARED
16
duplicate schemas with different values",
21
);
17
                SchemaValidate.ERROR_DUPLICATE_SCHEMA);
22
    
18
    
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