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");
void testStyleIsSet() throws Exception {
expectSpecificBuildException("testStyleIsSet",
"no stylesheet specified", "specify the " +
"stylesheet either as a filename in style " +
"attribute or as a nested resource");
}
public void testTransferParameterSet() throws Exception {
expectFileContains("testTransferParameterSet", // target
"out/out.xml", // file
"set='myvalue'"); // exptected string
}
public void testTransferParameterEmpty() throws Exception {
expectFileContains("testTransferParameterEmpty",
"out/out.xml",
"empty=''");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/FailTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/StyleTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | void test1() {↵ | | 1 | void testStyleIsSet() throws Exception {↵
|
2 | expectBuildExceptionContaining("test1",↵ | | 2 | expectSpecificBuildException("testStyleIsSet",↵
|
3 | "it is required to fail :-)",↵ | | 3 | "↵
|
4 | "No message");↵ | | |
|
5 | }↵ | | |
|
|
6 | public void test2() {↵ | | |
|
7 | expectSpecificBuildException("test2",↵ | | |
|
8 | "it is required to↵ | | 4 | no stylesheet specified", "specify the " +↵
|
| | | 5 | "stylesheet either as a filename in style " +↵
|
| | | 6 | "attribute or as a nested resource");↵
|
| | | 7 | }↵
|
|
| | | 8 | public void testTransferParameterSet() throws Exception {↵
|
| | | 9 | expectFileContains("testTransferParameterSet", // target↵
|
9 | fail :-)",↵ | | 10 | "out/out.xml", // fil↵
|
10 | "test2");↵ | | |
|
11 | }↵ | | |
|
|
12 | public void testText() {↵ | | |
|
13 | expectSpecificBuildException("testText↵ | | 11 | e↵
|
| | | 12 | "set='myvalue'"); // exptected string↵
|
| | | 13 | }↵
|
|
| | | 14 | public void testTransferParameterEmpty() throws Exception {↵
|
14 | ",↵ | | 15 | expectFileContains("testTransferParameterEmpty",↵
|
15 | "it is required to fail :-)",↵ | | 16 | ↵
|
16 | "testText↵ | | 17 | "out/out.xml",↵
|
17 | ");↵ | | 18 | "empty=''");↵
|
18 | | | 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 |