Debian Codegraph @

test/src/net/sf/antcontrib/property/VariableTest.java

raw symbols SCIP
1 /*
2 * Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
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 /* TODO: depends on the Antelope <if>, need to adjust to use the ant-contrib <if>
60 public void test8() {
61 expectPropertySet("test8", "x", "12");
62 expectLogContaining("test8", "12");
63 }
64 */
65 public void test9() {
66 expectPropertyUnset("test9", "i");
67 }
68
69 public void test10() {
70 expectPropertySet("test10", "x", "xxx");
71 }
72 }