1 4 package net.sourceforge.cruisecontrol.publishers; 5 6 import java.util.HashMap ; 7 import java.util.Map ; 8 9 import junit.framework.TestCase; 10 import net.sourceforge.cruisecontrol.testutil.TestUtil; 11 12 import org.jdom.Element; 13 14 15 18 public class AntPublisherTest extends TestCase { 19 20 public void testPopulatePropertiesForAntBuilder() { 21 Element successfulBuild = TestUtil.createElement(true, true); 22 Element failedBuild = TestUtil.createElement(false, false); 23 Map properties = new HashMap (); 24 AntPublisher publisher = new AntPublisher(); 25 26 publisher.populatePropertesForAntBuilder(successfulBuild, properties); 27 assertTrue("true".equals(properties.get("thisbuildsuccessful"))); 28 29 publisher.populatePropertesForAntBuilder(failedBuild, properties); 30 assertTrue("false".equals(properties.get("thisbuildsuccessful"))); 31 } 32 33 } 34 | Popular Tags |