KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > test > Test


1 /*
2
3    Copyright 2001 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.test;
19
20 /**
21  * Defines the interface of a <tt>Test</tt> case. It is
22  * highly recommended that implementations derive from the
23  * <tt>AbstractTest</tt> class or follow the same implementation
24  * approach, so that no exception is thrown from the
25  * <tt>run</tt> method, which is critical for the operation
26  * of the test infrastructure.
27  *
28  * @author <a HREF="mailto:vhardy@apache.lorg">Vincent Hardy</a>
29  * @version $Id: Test.java,v 1.4 2004/08/18 07:16:58 vhardy Exp $
30  */

31 public interface Test {
32     /**
33      * Returns this <tt>Test</tt>'s name.
34      */

35     public String JavaDoc getName();
36
37     /**
38      * Returns the <tt>Test</tt>'s qualified id, that is,
39      * the string made of all the id's parents separated
40      * by ".". For example, if this test's id is "C",
41      * its parent id is "B" and its grand-parent id is
42      * "A", this method should return "A.B.C".
43      */

44     public String JavaDoc getQualifiedId();
45
46     /**
47      * Returns the <tt>Test</tt>'s id. The notion of
48      * identifier is left to the user of the <tt>Test</tt>
49      * object, which explains why the user may set the
50      * id.
51      */

52     public String JavaDoc getId();
53
54     /**
55      * Sets this <tt>Test</tt>'s id.
56      */

57     public void setId(String JavaDoc id);
58
59     /**
60      * Requests this <tt>Test</tt> to run and produce a
61      * report. It is critical for the test infrastructure
62      * that implementations never throw exceptions
63      * from the run method, even if an error occurs internally
64      * in the test.
65      *
66      */

67     public TestReport run();
68
69     /**
70      * Returns this <tt>Test</tt>'s parent, in case this
71      * <tt>Test</tt> is part of a <tt>TestSuite</tt>.
72      * The returned value may be null.
73      */

74     public TestSuite getParent();
75
76     /**
77      * Set this <tt>Test</tt>'s parent.
78      */

79     public void setParent(TestSuite parent);
80 }
81
Popular Tags