1 | public class CopydirTest extends BuildFileTest {↵ | | 1 | public class CopyfileTest extends BuildFileTest {↵
|
|
2 | public Copydir↵ | | 2 | public void test6() {↵
|
| | | 3 | expectBuildException("test6", "target is directory");↵
|
| | | 4 | }↵
|
|
3 | Test(String name) {↵ | | 5 | public CopyfileTest(String name) {↵
|
4 | super(name);↵ | | 6 | super(name);↵
|
5 | }↵ | | 7 | }↵
|
|
6 | public void setUp() {↵ | | 8 | public void setUp() {↵
|
7 | configureProject("src/etc/testcases/taskdefs/copydir.xml");↵ | | 9 | configureProject("src/etc/testcases/taskdefs/copyfile.xml");↵
|
8 | }↵ | | 10 | }↵
|
|
9 | public void tearDown() {↵ | | 11 | public void tearDown() {↵
|
10 | executeTarget("cleanup");↵ | | 12 | executeTarget("cleanup");↵
|
11 | }↵ | | 13 | }↵
|
|
12 | public void test1() {↵ | | 14 | public void test1() {↵
|
13 | expectBuildException("test1", "required argument not specified");↵ | | 15 | expectBuildException("test1", "required argument not specified");↵
|
14 | }↵ | | 16 | }↵
|
|
15 | public void test2() {↵ | | 17 | public void test2() {↵
|
16 | expectBuildException("test2", "required argument not specified");↵ | | 18 | expectBuildException("test2", "required argument not specified");↵
|
17 | }↵ | | 19 | }↵
|
|
18 | public void test3() {↵ | | 20 | public void test3() {↵
|
19 | expectBuildException("test3", "required argument not specified");↵ | | 21 | expectBuildException("test3", "required argument not specified");↵
|
20 | }↵ | | 22 | }↵
|
|
21 | public void test4() {↵ | | 23 | public void test4() {↵
|
22 | expectLog("test4", "DEPRECATED - The copydir task is deprecated. Use copy instead.Warning: src == dest");↵ | | 24 | expectLog("test4", "DEPRECATED - The copyfile task is deprecated. Use copy instead.Warning: src == dest");↵
|
23 | }↵ | | 25 | }↵
|
|
24 | public void test5() {↵ | | 26 | public void test5() {↵
|
25 | executeTarget("test5");↵ | | 27 | executeTarget("test5");↵
|
26 | java.io.File f = new java.io.File(getProjectDir(), "../taskdefs.tmp");↵ | | 28 | java.io.File f = new java.io.File(getProjectDir(), "copyfile.tmp");↵
|
27 | if (!f.exists() || !f.isDirectory()) {↵ | | 29 | if (f.exists()↵
|
28 | fail("Copy failed");↵ | | |
|
29 | }↵ | | |
|
30 | // We keep this, so we have something to delete in later tests :-)↵ | | 30 | ) {↵
|
| | | 31 | f.delete();↵
|
| | | 32 | } else {↵
|
31 | }↵ | | 33 | ↵
|
|
32 | public void test6() {↵ | | 34 | ↵
|
33 | expectBuildException("test6", "target is file");↵ | | 35 | fail("Copy failed");↵
|
34 | | | 36 |
|