| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
package net.sf.antcontrib.property; |
| 17 |
|
| 18 |
import net.sf.antcontrib.BuildFileTestBase; |
| 19 |
|
| 20 |
|
| 21 |
public class VariableTest extends BuildFileTestBase { |
| 22 |
|
| 23 |
public VariableTest(String name) { |
| 24 |
super(name); |
| 25 |
} |
| 26 |
|
| 27 |
public void setUp() { |
| 28 |
configureProject("test/resources/property/variabletest.xml"); |
| 29 |
} |
| 30 |
|
| 31 |
public void test1() { |
| 32 |
expectPropertySet("test1", "x", "6"); |
| 33 |
} |
| 34 |
|
| 35 |
public void test2() { |
| 36 |
expectPropertySet("test2", "x", "12"); |
| 37 |
} |
| 38 |
|
| 39 |
public void test3() { |
| 40 |
expectPropertySet("test3", "x", "6 + 12"); |
| 41 |
} |
| 42 |
|
| 43 |
public void test4() { |
| 44 |
expectPropertySet("test4", "x", "6"); |
| 45 |
} |
| 46 |
|
| 47 |
public void test5() { |
| 48 |
expectPropertySet("test5", "str", "I am a string."); |
| 49 |
} |
| 50 |
|
| 51 |
public void test6() { |
| 52 |
expectPropertySet("test6", "x", "Today is blue."); |
| 53 |
} |
| 54 |
|
| 55 |
public void test7() { |
| 56 |
expectPropertySet("test7", "x", "6"); |
| 57 |
} |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
public void test9() { |
| 66 |
expectPropertyUnset("test9", "i"); |
| 67 |
} |
| 68 |
|
| 69 |
public void test10() { |
| 70 |
expectPropertySet("test10", "x", "xxx"); |
| 71 |
} |
| 72 |
} |