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