source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/src/testcases/org/apache/tools/ant/types/RedirectorElementTest.java@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 1.6 KB
Line 
1/*
2 * Copyright 2004-2005 The Apache Software Foundation.
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 */
17package org.apache.tools.ant.types;
18
19import org.apache.tools.ant.Project;
20import org.apache.tools.ant.BuildFileTest;
21
22public class RedirectorElementTest extends BuildFileTest {
23
24 public RedirectorElementTest(String name) {
25 super(name);
26 }
27
28 public void setUp() {
29 configureProject("src/etc/testcases/types/redirector.xml", Project.MSG_VERBOSE);
30 }
31
32 public void test1() {
33 executeTarget("test1");
34 assertTrue((getProject().getReference("test1")
35 instanceof RedirectorElement));
36 }
37
38 public void test2() {
39 expectBuildException("test2", "You must not specify more than one "
40 + "attribute when using refid");
41 }
42
43 public void test3() {
44 expectBuildException("test3", "You must not specify nested elements "
45 + "when using refid");
46 }
47
48 public void test4() {
49 executeTarget("test4");
50 }
51
52 public void testRefid() {
53 executeTarget("testRefid");
54 }
55
56}
Note: See TracBrowser for help on using the repository browser.