KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tools > ant > taskdefs > optional > XmlValidateCatalogTest


1 /*
2  * Copyright 2002,2004 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  */

17 package org.apache.tools.ant.taskdefs.optional;
18
19 import java.io.*;
20 import java.util.Properties JavaDoc;
21
22 import org.apache.tools.ant.BuildException;
23 import org.apache.tools.ant.BuildFileTest;
24
25 /**
26  * Tests the XMLValidate optional task with nested external catalogs.
27  *
28  * @see XmlValidateTest
29  * @since Ant 1.6
30  */

31 public class XmlValidateCatalogTest extends BuildFileTest {
32
33     /**
34      * where tasks run
35      */

36     private final static String JavaDoc TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/";
37
38
39     /**
40      * Constructor
41      *
42      * @param name testname
43      */

44     public XmlValidateCatalogTest(String JavaDoc name) {
45         super(name);
46     }
47
48
49     /**
50      * The JUnit setup method
51      */

52     public void setUp() {
53         configureProject(TASKDEFS_DIR + "xmlvalidate.xml");
54     }
55
56
57     /**
58      * The teardown method for JUnit
59      */

60     public void tearDown() {
61
62     }
63
64     /**
65      * catalogfiles fileset should be ignored
66      * if resolver.jar is not present, but will
67      * be used if it is. either way, test should
68      * work b/c we have a nested dtd with the same
69      * entity
70      */

71     public void testXmlCatalogFiles() {
72         executeTarget("xmlcatalogfiles");
73     }
74
75     /**
76      * Test nested catalogpath.
77      * It should be ignored if resolver.jar is not
78      * present, but will be used if it is. either
79      * way, test should work b/c we have a nested
80      * dtd with the same entity
81      */

82     public void testXmlCatalogPath() {
83         executeTarget("xmlcatalogpath");
84     }
85
86 }
87
Popular Tags