1 17 package org.apache.tools.ant.taskdefs.condition; 18 19 import org.apache.tools.ant.Project; 20 import org.apache.tools.ant.BuildException; 21 import org.apache.tools.ant.BuildFileTest; 22 23 27 public class IsReferenceTest extends BuildFileTest { 28 29 public IsReferenceTest(String name) { 30 super(name); 31 } 32 33 36 public void setUp() { 37 configureProject("src/etc/testcases/taskdefs/conditions/isreference.xml"); 38 } 39 40 public void testBasic() { 41 expectPropertySet("basic", "global-path"); 42 assertPropertySet("target-path"); 43 assertPropertyUnset("undefined"); 44 } 45 46 public void testNotEnoughArgs() { 47 expectSpecificBuildException("isreference-incomplete", 48 "refid attribute has been omitted", 49 "No reference specified for isreference " 50 + "condition"); 51 } 52 53 public void testType() { 54 expectPropertySet("type", "global-path"); 55 assertPropertyUnset("global-path-as-fileset"); 56 assertPropertyUnset("global-path-as-foo"); 57 assertPropertySet("global-echo"); 58 } 59 60 } 61 | Popular Tags |