1 17 package org.apache.tools.ant.types; 18 19 import org.apache.tools.ant.Project; 20 import org.apache.tools.ant.BuildFileTest; 21 22 public class RedirectorElementTest extends BuildFileTest { 23 24 public RedirectorElementTest(String name) { 25 super(name); 26 } 27 28 public void setUp() { 29 configureProject("src/etc/testcases/types/redirector.xml", Project.MSG_VERBOSE); 30 } 31 32 public void test1() { 33 executeTarget("test1"); 34 assertTrue((getProject().getReference("test1") 35 instanceof RedirectorElement)); 36 } 37 38 public void test2() { 39 expectBuildException("test2", "You must not specify more than one " 40 + "attribute when using refid"); 41 } 42 43 public void test3() { 44 expectBuildException("test3", "You must not specify nested elements " 45 + "when using refid"); 46 } 47 48 public void test4() { 49 executeTarget("test4"); 50 } 51 52 public void testRefid() { 53 executeTarget("testRefid"); 54 } 55 56 } 57 | Popular Tags |