KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > cruisecontrol > publishers > AntPublisherTest


1 /*
2  * Created on Mar 16, 2005
3  */

4 package net.sourceforge.cruisecontrol.publishers;
5
6 import java.util.HashMap JavaDoc;
7 import java.util.Map JavaDoc;
8
9 import junit.framework.TestCase;
10 import net.sourceforge.cruisecontrol.testutil.TestUtil;
11
12 import org.jdom.Element;
13
14
15 /**
16  * @author Jeffrey Fredrick
17  */

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 JavaDoc properties = new HashMap JavaDoc();
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