abac0-leakabac0-meimei-idtvf-new-xml
Last change
on this file since 2d45fd4 was
8375d4f,
checked in by Ted Faber <faber@…>, 12 years ago
|
Regression test framework
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | package net.deterlab.abac.regression; |
---|
2 | |
---|
3 | import java.io.*; |
---|
4 | |
---|
5 | public abstract class RegressionTest { |
---|
6 | /** The name of the test */ |
---|
7 | protected String testName; |
---|
8 | /** A reason if the test fails */ |
---|
9 | protected String reason; |
---|
10 | |
---|
11 | /** |
---|
12 | * Create a new test with the give name. |
---|
13 | * @param name a String, the test name |
---|
14 | */ |
---|
15 | protected RegressionTest(String name) { |
---|
16 | testName = name; |
---|
17 | reason = null; |
---|
18 | } |
---|
19 | |
---|
20 | /** |
---|
21 | * Return the test name |
---|
22 | * @return a String the test name |
---|
23 | */ |
---|
24 | public String getName() { return testName; } |
---|
25 | |
---|
26 | /** |
---|
27 | * Return the failure reason (if any) |
---|
28 | * @return a String the failure reason (if any) |
---|
29 | */ |
---|
30 | public String getReason() { return reason; } |
---|
31 | |
---|
32 | /** |
---|
33 | * Set the failure reason |
---|
34 | * @param msg a String holding the new reason |
---|
35 | */ |
---|
36 | public void setReason(String msg) { reason = msg; } |
---|
37 | |
---|
38 | /** |
---|
39 | * Carry out the test |
---|
40 | * @param data a File pointing to a directory that contains files the test |
---|
41 | * may need |
---|
42 | * @param scratch a File pointing to a directory that the test can use to |
---|
43 | * store data |
---|
44 | * @return a boolean, true if the test is passed |
---|
45 | */ |
---|
46 | public abstract boolean runTest(File data, File scratch); |
---|
47 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.