blob: 41a5fa09c06653e9ea22dc72d641ea40e4afa084 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
/*
* Copyright 2000-2002,2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.tools.ant.taskdefs.optional.junit;
import java.io.File;
import java.util.Vector;
/**
* Baseclass for BatchTest and JUnitTest.
*
*/
public abstract class BaseTest {
protected boolean haltOnError = false;
protected boolean haltOnFail = false;
protected boolean filtertrace = true;
protected boolean fork = false;
protected String ifProperty = null;
protected String unlessProperty = null;
protected Vector formatters = new Vector();
/** destination directory */
protected File destDir = null;
protected String failureProperty;
protected String errorProperty;
public void setFiltertrace(boolean value) {
filtertrace = value;
}
public boolean getFiltertrace() {
return filtertrace;
}
public void setFork(boolean value) {
fork = value;
}
public boolean getFork() {
return fork;
}
public void setHaltonerror(boolean value) {
haltOnError = value;
}
public void setHaltonfailure(boolean value) {
haltOnFail = value;
}
public boolean getHaltonerror() {
return haltOnError;
}
public boolean getHaltonfailure() {
return haltOnFail;
}
public void setIf(String propertyName) {
ifProperty = propertyName;
}
public void setUnless(String propertyName) {
unlessProperty = propertyName;
}
public void addFormatter(FormatterElement elem) {
formatters.addElement(elem);
}
/**
* Sets the destination directory.
*/
public void setTodir(File destDir) {
this.destDir = destDir;
}
/**
* @return the destination directory as an absolute path if it exists
* otherwise return <tt>null</tt>
*/
public String getTodir() {
if (destDir != null) {
return destDir.getAbsolutePath();
}
return null;
}
public java.lang.String getFailureProperty() {
return failureProperty;
}
public void setFailureProperty(String failureProperty) {
this.failureProperty = failureProperty;
}
public java.lang.String getErrorProperty() {
return errorProperty;
}
public void setErrorProperty(String errorProperty) {
this.errorProperty = errorProperty;
}
}
|