1 18 19 package org.apache.tools.ant.taskdefs.optional.junit; 20 21 import java.io.File ; 22 import java.util.Vector ; 23 24 28 public abstract class BaseTest { 29 protected boolean haltOnError = false; 31 protected boolean haltOnFail = false; 32 protected boolean filtertrace = true; 33 protected boolean fork = false; 34 protected String ifProperty = null; 35 protected String unlessProperty = null; 36 protected Vector formatters = new Vector (); 37 38 protected File destDir = null; 39 40 protected String failureProperty; 41 protected String errorProperty; 42 44 48 public void setFiltertrace(boolean value) { 49 filtertrace = value; 50 } 51 52 56 public boolean getFiltertrace() { 57 return filtertrace; 58 } 59 60 64 public void setFork(boolean value) { 65 fork = value; 66 } 67 68 72 public boolean getFork() { 73 return fork; 74 } 75 76 80 public void setHaltonerror(boolean value) { 81 haltOnError = value; 82 } 83 84 88 public void setHaltonfailure(boolean value) { 89 haltOnFail = value; 90 } 91 92 96 public boolean getHaltonerror() { 97 return haltOnError; 98 } 99 100 104 public boolean getHaltonfailure() { 105 return haltOnFail; 106 } 107 108 114 public void setIf(String propertyName) { 115 ifProperty = propertyName; 116 } 117 118 124 public void setUnless(String propertyName) { 125 unlessProperty = propertyName; 126 } 127 128 132 public void addFormatter(FormatterElement elem) { 133 formatters.addElement(elem); 134 } 135 136 140 public void setTodir(File destDir) { 141 this.destDir = destDir; 142 } 143 144 149 public String getTodir() { 150 if (destDir != null) { 151 return destDir.getAbsolutePath(); 152 } 153 return null; 154 } 155 156 160 public String getFailureProperty() { 161 return failureProperty; 162 } 163 164 169 public void setFailureProperty(String failureProperty) { 170 this.failureProperty = failureProperty; 171 } 172 173 177 public String getErrorProperty() { 178 return errorProperty; 179 } 180 181 186 public void setErrorProperty(String errorProperty) { 187 this.errorProperty = errorProperty; 188 } 189 } 190 | Popular Tags |