1 17 18 package org.apache.tools.ant; 19 20 public class TaskContainerTest extends BuildFileTest { 21 22 public TaskContainerTest(String name) { 23 super(name); 24 } 25 26 public void setUp() { 27 configureProject("src/etc/testcases/core/taskcontainer.xml"); 28 } 29 30 public void tearDown() { 31 executeTarget("cleanup"); 32 } 33 34 public void testPropertyExpansion() { 35 executeTarget("testPropertyExpansion"); 36 assertTrue("attribute worked", 37 getLog().indexOf("As attribute: it worked") > -1); 38 assertTrue("nested text worked", 39 getLog().indexOf("As nested text: it worked") > -1); 40 } 41 42 public void testTaskdef() { 43 executeTarget("testTaskdef"); 44 assertTrue("attribute worked", 45 getLog().indexOf("As attribute: it worked") > -1); 46 assertTrue("nested text worked", 47 getLog().indexOf("As nested text: it worked") > -1); 48 assertTrue("nested text worked", 49 getLog().indexOf("As nested task: it worked") > -1); 50 } 51 52 public void testCaseInsensitive() { 53 executeTarget("testCaseInsensitive"); 54 assertTrue("works outside of container", 55 getLog().indexOf("hello ") > -1); 56 assertTrue("works inside of container", 57 getLog().indexOf("world") > -1); 58 } 59 60 } 61 | Popular Tags |