01: /*
02:
03: Derby - Class org.apache.derbyTesting.unitTests.harness.UnitTest
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to You under the Apache License, Version 2.0
09: (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: public interface UnitTest {
37: /**
38: * Execute the test.
39: *
40: * @param out A HeaderPrintWriter the test may use for tracing.
41: * To disable tracing the caller may provide a
42: * HeaderPrintWriter which throws away all the data
43: * the test writes.
44: *
45: * @return true iff the test passes
46: */
47: public boolean Execute(HeaderPrintWriter out);
48:
49: /**
50: * UnitTestDuration
51: *
52: * @return The tests duration.
53: *
54: * @see UnitTestConstants
55: **/
56: public int UnitTestDuration();
57:
58: /**
59: * UnitTestDuration
60: *
61: * @return The tests duration.
62: *
63: * @see UnitTestConstants
64: **/
65: public int UnitTestType();
66:
67: }
|