1package test.ant;
2
3import static org.testng.Assert.assertEquals;
4import static org.testng.Assert.assertNotNull;
5
6import org.testng.annotations.Test;
7
8/**
9 * Test whether nested propertysets are passed passed from the ant task. Executed by the "run:antprop" target
10 * in test/build.xml.
11 *
12 * @author <a href="mailto:ttopwells@gmail.com">Todd Wells</a>
13 */
14public class AntSystemPropertySet {
15
16  @Test
17  public void outputTestProperties()
18  {
19    assertNotNull(System.getProperty("syspropset1"), "syspropset1 not found");
20    assertEquals(System.getProperty("syspropset1"), "value 1", "Wrong value for syspropset1");
21
22    assertNotNull(System.getProperty("syspropset2"), "syspropset2 not found");
23    assertEquals(System.getProperty("syspropset2"), "value 2", "Wrong value for syspropset2");
24
25    assertNotNull(System.getProperty("sysprop1"), "sysprop1 not found");
26    assertEquals(System.getProperty("sysprop1"), "value 3", "Wrong value for sysprop1");
27  }
28}
29