KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > latka > Suite


1 /*
2  * Copyright 1999-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.commons.latka;
18
19 import java.net.URL JavaDoc;
20
21 /**
22  * References a Latka XML suite, stored either inside a Reader
23  * or at a file URI.
24  *
25  * @see Latka#runTests(Suite, org.apache.commons.latka.event.LatkaEventInfo)
26  *
27  * @author Morgan Delagrange
28  */

29 public class Suite {
30
31     /** test suite URL */
32     protected URL JavaDoc _url = null;
33
34     /**
35      * Create a test suite from an XML document located at the
36      * designated URL.
37      *
38      * @param url of a Latka XML suite
39      */

40     public Suite(URL JavaDoc url) {
41         _url = url;
42     }
43
44     /**
45      * URL containing the test suite.
46      *
47      * @return test suite URL
48      */

49     public URL JavaDoc getURL() {
50         return _url;
51     }
52
53     /**
54      * Set the URL of the test suite. Much like a SAX
55      * InputSource, you may set both a Reader and a URL,
56      * indicating that while the base XML document is
57      * inside a Reader, the parser resolves entities
58      * relative to the given URL.
59      * @param url the URL to set
60      */

61     public void setURL(URL JavaDoc url) {
62         _url = url;
63     }
64
65 }
Popular Tags