Browse Source

move propertyset test to antunit

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1090340 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 14 years ago
parent
commit
778d54d381
2 changed files with 8 additions and 48 deletions
  1. +8
    -4
      src/tests/antunit/types/propertyset-test.xml
  2. +0
    -44
      src/tests/junit/org/apache/tools/ant/types/PropertySetTest.java

src/etc/testcases/types/propertyset.xml → src/tests/antunit/types/propertyset-test.xml View File

@@ -17,7 +17,11 @@
*
-->

<project>
<project name="test-propertyset" basedir="." default="antunit"
xmlns:au="antlib:org.apache.ant.antunit">

<import file="../antunit-base.xml" />

<property name="fooA" value="FooA"/>
<property name="barB" value="BarB"/>

@@ -48,14 +52,14 @@
</sequential>
</macrodef>

<target name="reference-to-two-references">
<target name="test-reference-to-two-references">
<expect.equals
test="reference to two references"
exp="barB=BarB, fooA=FooA"
got="${toString:my-set}"/>
</target>

<target name="nested-mapped">
<target name="test-nested-mapped">
<propertyset id="nested-mapped">
<propertyset>
<propertyset refid="properties-starting-with-foo"/>
@@ -72,7 +76,7 @@
got="${toString:nested-mapped}"/>
</target>

<target name="nested-mapped-mapped">
<target name="test-nested-mapped-mapped">
<propertyset id="nested-mapped-mapped">
<propertyset>
<propertyset refid="properties-starting-with-foo"/>

+ 0
- 44
src/tests/junit/org/apache/tools/ant/types/PropertySetTest.java View File

@@ -1,44 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package org.apache.tools.ant.types;

import org.apache.tools.ant.BuildFileTest;

public class PropertySetTest extends BuildFileTest {

public PropertySetTest(String name) {
super(name);
}

public void setUp() {
configureProject("src/etc/testcases/types/propertyset.xml");
}

public void testReferenceToTwoReferences() {
executeTarget("reference-to-two-references");
}

public void testNestedMapped() {
executeTarget("nested-mapped");
}

public void testNestedMappedMapped() {
executeTarget("nested-mapped-mapped");
}
}

Loading…
Cancel
Save