KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derbyTesting > unitTests > harness > UnitTest


1 /*
2
3    Derby - Class org.apache.derbyTesting.unitTests.harness.UnitTest
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derbyTesting.unitTests.harness;
23
24 import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
25
26 /**
27  * The UnitTest interface is implemented by the class
28  * that tests a class. Such a class has the name XUnitTest
29  * and is the test for the class named X.
30  * <p>
31  *
32  * @version 0.1
33  * @author Ames
34  */

35
36
37 public interface UnitTest
38 {
39     /**
40      * Execute the test.
41      *
42      * @param out A HeaderPrintWriter the test may use for tracing.
43      * To disable tracing the caller may provide a
44      * HeaderPrintWriter which throws away all the data
45      * the test writes.
46      *
47      * @return true iff the test passes
48      */

49     public boolean Execute (HeaderPrintWriter out);
50
51     /**
52      * UnitTestDuration
53      *
54      * @return The tests duration.
55      *
56      * @see UnitTestConstants
57      **/

58     public int UnitTestDuration();
59
60     /**
61      * UnitTestDuration
62      *
63      * @return The tests duration.
64      *
65      * @see UnitTestConstants
66      **/

67     public int UnitTestType();
68
69 }
70
71
Popular Tags