summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorSteffen Grund <sg@openoffice.org>2003-03-25 14:32:44 +0000
committerSteffen Grund <sg@openoffice.org>2003-03-25 14:32:44 +0000
commitc7591cdc43f406abd3b326b0fb51fd835d251bcb (patch)
treeee0965bd9ce75e168fb73ef635112a74224224b7 /qadevOOo
parent79017a027dc78d31db619e3b05cb5b47d39a7575 (diff)
CHG: added usage of 'before()' and 'after()' methods
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/complexlib/ComplexTestCase.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/qadevOOo/runner/complexlib/ComplexTestCase.java b/qadevOOo/runner/complexlib/ComplexTestCase.java
index 20f4d9f8d770..a972a8b9ba4c 100644
--- a/qadevOOo/runner/complexlib/ComplexTestCase.java
+++ b/qadevOOo/runner/complexlib/ComplexTestCase.java
@@ -2,9 +2,9 @@
*
* $RCSfile: ComplexTestCase.java,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Date: 2003-03-18 15:55:08 $
+ * last change: $Date: 2003-03-25 15:32:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,7 +88,7 @@ public abstract class ComplexTestCase implements ComplexTest {
// get the environment
param = environment;
log = entry.Logger;
- String beforeErrorMsg = null;
+ String errorMsg = null;
// start with the before() method
try {
@@ -104,11 +104,11 @@ public abstract class ComplexTestCase implements ComplexTest {
catch(java.lang.reflect.InvocationTargetException e) {
Throwable t = e.getTargetException();
log.println(t.toString());
- beforeErrorMsg = "Exception in before() method.\n\r" +
+ errorMsg = "Exception in before() method.\n\r" +
t.getMessage();
- if (beforeErrorMsg == null)
- beforeErrorMsg = "";
- log.println("Message: " + beforeErrorMsg);
+ if (errorMsg == null)
+ errorMsg = "";
+ log.println("Message: " + errorMsg);
}
//executeMethodTests
@@ -117,10 +117,10 @@ public abstract class ComplexTestCase implements ComplexTest {
message = "";
subEntry = entry.SubEntries[i];
// set all test methods on failed, if 'before()' did not work.
- if (beforeErrorMsg != null) {
- subEntry.State = beforeErrorMsg;
+ if (errorMsg != null) {
+ subEntry.State = errorMsg;
subEntry.hasErrorMsg = true;
- subEntry.ErrorMsg = beforeErrorMsg;
+ subEntry.ErrorMsg = errorMsg;
continue;
}
Method testMethod = null;
@@ -154,7 +154,7 @@ public abstract class ComplexTestCase implements ComplexTest {
subEntry.ErrorMsg = message;
}
- if (beforeErrorMsg == null) {
+ if (errorMsg == null) {
// the after() method
try {
Method after = this.getClass().getMethod("after",null);
@@ -169,11 +169,11 @@ public abstract class ComplexTestCase implements ComplexTest {
catch(java.lang.reflect.InvocationTargetException e) {
Throwable t = e.getTargetException();
log.println(t.toString());
- beforeErrorMsg = "Exception in 'after()' method.\n\r" +
+ errorMsg = "Exception in 'after()' method.\n\r" +
t.getMessage();
- if (beforeErrorMsg == null)
- beforeErrorMsg = "";
- log.println("Message: " + beforeErrorMsg);
+ if (errorMsg == null)
+ errorMsg = "";
+ log.println("Message: " + errorMsg);
}
}
}