1 17 18 package org.apache.tools.ant.taskdefs; 19 20 import org.apache.tools.ant.BuildFileTest; 21 import org.apache.tools.ant.Project; 22 import org.apache.tools.ant.util.JavaEnvUtils; 23 24 27 public class AvailableTest extends BuildFileTest { 28 29 public AvailableTest(String name) { 30 super(name); 31 } 32 33 public void setUp() { 34 configureProject("src/etc/testcases/taskdefs/available.xml"); 35 } 36 37 public void test1() { 39 expectBuildException("test1", "required argument not specified"); 40 } 41 42 public void test2() { 44 expectBuildException("test2", "required argument not specified"); 45 } 46 47 public void test3() { 49 expectBuildException("test3", "required argument not specified"); 50 } 51 52 public void test4() { 54 executeTarget("test4"); 55 assertTrue(project.getProperty("test") == null); 56 } 57 58 public void test5() { 60 executeTarget("test5"); 61 assertEquals("true", project.getProperty("test")); 62 } 63 64 public void test6() { 66 executeTarget("test6"); 67 assertTrue(project.getProperty("test") == null); 68 } 69 70 public void test7() { 72 executeTarget("test7"); 73 assertEquals("true", project.getProperty("test")); 74 } 75 76 public void test8() { 78 executeTarget("test8"); 79 assertTrue(project.getProperty("test") == null); 80 } 81 82 public void test9() { 84 executeTarget("test9"); 85 assertEquals("true", project.getProperty("test")); 86 } 87 88 public void test10() { 90 executeTarget("test10"); 91 assertEquals("true", project.getProperty("test")); 92 } 93 94 public void test11() { 96 executeTarget("test11"); 97 assertNull(project.getProperty("test")); 98 } 99 100 public void test12() { 102 executeTarget("test12"); 103 assertNull(project.getProperty("test")); 104 assertEquals("true", project.getProperty("")); 105 } 106 107 public void test13() { 109 executeTarget("test13"); 110 assertNull(project.getProperty("test")); 111 } 112 113 public void test13b() { 115 executeTarget("test13b"); 116 assertEquals("true", project.getProperty("test")); 117 } 118 119 123 128 public void test15() { 130 executeTarget("test15"); 131 assertNull(project.getProperty("test")); 132 } 133 134 public void test16() { 137 executeTarget("test16"); 138 assertEquals("true", project.getProperty("test")); 139 } 140 141 public void test17() { 144 executeTarget("test17"); 145 assertEquals("true", project.getProperty("test")); 146 } 147 148 public void test18() { 150 executeTarget("test18"); 151 assertNull(project.getProperty("test")); 152 } 153 154 public void test19() { 156 expectBuildException("test19", "Invalid value for type attribute."); 157 } 158 159 public void test20() { 161 executeTarget("test20"); 162 assertNull(project.getProperty("test")); 163 } 164 165 public void test21() { 167 executeTarget("test21"); 168 assertEquals("true", project.getProperty("test")); 169 } 170 171 public void test22() { 173 executeTarget("test22"); 174 assertEquals("true", project.getProperty("test")); 175 } 176 177 public void test23() { 179 executeTarget("test23"); 180 assertEquals("true", project.getProperty("test")); 181 } 182 183 public void test24() { 185 executeTarget("test24"); 186 assertEquals("true", project.getProperty("test")); 187 } 188 189 public void testSearchInPathNotThere() { 191 executeTarget("searchInPathNotThere"); 192 assertNull(project.getProperty("test")); 193 } 194 195 public void testSearchInPathIsThere() { 197 executeTarget("searchInPathIsThere"); 198 assertEquals("true", project.getProperty("test")); 199 } 200 201 public void testDoubleBasedir() { 203 executeTarget("testDoubleBasedir"); 204 } 205 } 206 | Popular Tags |