source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/src/main/org/apache/tools/ant/taskdefs/optional/junit/BaseTest.java@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

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