void testWithStyleAttrAndResource() throws Exception {
expectSpecificBuildException("testWithStyleAttrAndResource",
"Must throws a BuildException", "specify the " +
"stylesheet either as a filename in style " +
"attribute or as a nested resource but not " +
"as both");
}
public void testWithFileResource() throws Exception {
expectFileContains("testWithFileResource", "out/out.xml", "set='value'");
}
public void testWithUrlResource() throws Exception {
expectFileContains("testWithUrlResource", "out/out.xml", "set='value'");
}
void test1() {
expectBuildExceptionContaining("test1",
"it is required to fail :-)",
"No message");
}
public void test2() {
expectSpecificBuildException("test2",
"it is required to fail :-)",
"test2");
}
public void testText() {
expectSpecificBuildException("testText",
"it is required to fail :-)",
"testText");
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/StyleTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/FailTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | void testWithStyleAttrAndResource() throws Exception {↵ | | 1 | void test1() {↵
|
2 | expectSpecificBuildException("testWithStyleAttrAndResource",↵ | | 2 | expectBuildException↵
|
3 | "Must throws a BuildException", "specify the " +↵ | | |
|
4 | "stylesheet either as a filename in style " +↵ | | |
|
5 | "attribute or as a nested resource but not " +↵ | | |
|
6 | ↵ | | 3 | Containing("test1",↵
|
| | | 4 | "it is required to fail :-)",↵
|
| | | 5 | "No message");↵
|
| | | 6 | }↵
|
|
| | | 7 | public void test2() {↵
|
| | | 8 | expectSpecificBuildException("test2",↵
|
| | | 9 | "it is required to fail :-)",↵
|
7 | "as both");↵ | | 10 | "test2");↵
|
8 | }↵ | | 11 | }↵
|
|
9 | public void testWithFileResource() throws Exception {↵ | | 12 | public void test↵
|
10 | expectFileContains("testWithFileResource", "out/out.xml", "set='value'");↵ | | |
|
| | | 13 | Text() {↵
|
| | | 14 | expectSpecificBuildException("testText",↵
|
11 | }↵ | | 15 | ↵
|
|
12 | public void testWithUrlResource() throws Exception {↵ | | 16 | ↵
|
13 | expectFileContains("testWithUrlResource", "out/out.xml", "set='value'↵ | | 17 | "it is required to fail :-)",↵
|
14 | ");↵ | | 18 | "testText");↵
|
15 | } | | 19 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |