1 48 package net.sf.antcontrib.property; 49 50 import org.apache.tools.ant.BuildFileTest; 51 52 57 public class PropertyCopyTest extends BuildFileTest { 58 59 public PropertyCopyTest(String name) { 60 super(name); 61 } 62 63 public void setUp() { 64 configureProject("test/resources/property/propertycopy.xml"); 65 } 66 67 public void testMissingName() { 68 expectSpecificBuildException("missingName", "missing name", 69 "Missing the 'name' attribute."); 70 } 71 72 public void testMissingFrom() { 73 expectSpecificBuildException("missingFrom", "missing from", 74 "Missing the 'from' attribute."); 75 } 76 77 public void testNonSilent() { 78 expectSpecificBuildException("nonSilent", "from doesn't exist", 79 "Property 'bar' is not defined."); 80 } 81 82 public void testSilent() { 83 executeTarget("silent"); 84 assertPropertyEquals("foo", null); 85 } 86 87 public void testNormal() { 88 executeTarget("normal"); 89 assertPropertyEquals("displayName", "My Organiziation"); 90 } 91 } 92 | Popular Tags |