public class LoaderRefTest extends BuildFileTest {
public LoaderRefTest(String name) {
super(name);
}
public void setUp() {
configureProject("src/etc/testcases/core/loaderref/loaderref.xml");
}
public void tearDown() {
executeTarget("clean");
}
// override allowed on <available>
public void testBadRef() {
expectBuildExceptionContaining("testbadref", "Should fail due to ref "
+ "not being a class loader", "does not reference a class loader");
public class EmailTaskTest extends BuildFileTest {
public EmailTaskTest(String name) {
super(name);
}
public void setUp() {
configureProject("src/etc/testcases/taskdefs/email/mail.xml");
}
public void test1() {
expectBuildException("test1", "SMTP auth only possible with MIME mail");
}
public void test2() {
expectBuildException("test2", "SSL only possible with MIME mail");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/LoaderRefTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/email/EmailTaskTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | public class LoaderRefTest extends BuildFileTest {↵ | | 1 | public class EmailTaskTest extends BuildFileTest {↵
|
|
2 | public LoaderRefTest(String name) {↵ | | 2 | public EmailTaskTest(String name) {↵
|
3 | super(name);↵ | | 3 | super(name);↵
|
4 | }↵ | | 4 | }↵
|
|
5 | public void setUp() {↵ | | 5 | public void setUp() {↵
|
6 | configureProject("src/etc/testcases/core/loaderref/loaderref.xml");↵ | | 6 | configureProject("src/etc/testcases/taskdefs/email/mail.xml");↵
|
7 | }↵ | | 7 | }↵
|
|
8 | public void tearDown() {↵ | | 8 | public void test1() {↵
|
9 | executeTarget("clean");↵ | | 9 | expec↵
|
10 | }↵ | | |
|
|
11 | // override allowed on <available>↵ | | 10 | tBuildException("test1", "SMTP auth only possible with MIME mail");↵
|
| | | 11 | }↵
|
|
12 | public void testBadRef() {↵ | | 12 | public void test2() {↵
|
13 | expectBuildExceptionContaining("testbadref", "Should fail due to ref "↵ | | 13 | expectBuildException↵
|
14 | + "not being a class loader", "does not reference a class loader");↵ | | 14 | ("test2", "SSL only possible with MIME mail");↵
|
15 | | | 15 |
|
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 |