summaryrefslogtreecommitdiffstats
path: root/qadevOOo/runner/lib
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-16 09:18:05 +0200
committerNoel Grandin <noel@peralex.com>2015-10-16 10:35:55 +0200
commit1bb1fc060d7849c9ef418ef510de8085daaee13a (patch)
treef5dbd8561a87c241b4455490bc42de7be67a4b0f /qadevOOo/runner/lib
parentconvert runState to a proper enum (diff)
downloadcore-1bb1fc060d7849c9ef418ef510de8085daaee13a.tar.gz
core-1bb1fc060d7849c9ef418ef510de8085daaee13a.zip
rename state to bSuccessful
Change-Id: Idc757217b84812fa55efbcfc004abd02d0a78dc3
Diffstat (limited to 'qadevOOo/runner/lib')
-rw-r--r--qadevOOo/runner/lib/ExceptionStatus.java2
-rw-r--r--qadevOOo/runner/lib/SimpleStatus.java28
-rw-r--r--qadevOOo/runner/lib/Status.java22
3 files changed, 20 insertions, 32 deletions
diff --git a/qadevOOo/runner/lib/ExceptionStatus.java b/qadevOOo/runner/lib/ExceptionStatus.java
index 8fee550588da..d08557341291 100644
--- a/qadevOOo/runner/lib/ExceptionStatus.java
+++ b/qadevOOo/runner/lib/ExceptionStatus.java
@@ -29,7 +29,7 @@ class ExceptionStatus extends Status {
* @param t the exception an activity terminated with.
*/
ExceptionStatus( Throwable t ) {
- super(RunState.EXCEPTION, FAILED);
+ super(RunState.EXCEPTION, false/*bSuccessful*/);
String message = t.getMessage();
if (message != null)
runStateString = message;
diff --git a/qadevOOo/runner/lib/SimpleStatus.java b/qadevOOo/runner/lib/SimpleStatus.java
index 11e3b7e65dc6..e65666d66331 100644
--- a/qadevOOo/runner/lib/SimpleStatus.java
+++ b/qadevOOo/runner/lib/SimpleStatus.java
@@ -25,19 +25,10 @@ package lib;
*/
class SimpleStatus {
- /* Test states */
-
- /**
- * The constant represents FAILED state.
- */
- public static final boolean FAILED = false;
-
-
-
/**
* The field is holding state of the status.
*/
- private final boolean state;
+ private final boolean bSuccessful;
/**
* The field is holding reason of the status.
@@ -53,8 +44,8 @@ class SimpleStatus {
/**
* The constructor initialize state and reason field.
*/
- protected SimpleStatus( RunState runState, boolean state ) {
- this.state = state;
+ protected SimpleStatus( RunState runState, boolean bSuccessful ) {
+ this.bSuccessful = bSuccessful;
this.runState = runState;
if ( runState == RunState.PASSED ) {
runStateString = "PASSED";
@@ -70,17 +61,14 @@ class SimpleStatus {
/**
* The constructor initialize state and reason field.
*/
- protected SimpleStatus(String runStateString, boolean state) {
- this.state = state;
+ protected SimpleStatus(String runStateString, boolean bSuccessful) {
+ this.bSuccessful = bSuccessful;
this.runState = RunState.USER_DEFINED;
this.runStateString = runStateString;
}
- /**
- * getState implementation. Just returns the state field value.
- */
- public boolean getState() {
- return state;
+ public boolean isSuccessful() {
+ return bSuccessful;
}
/**
@@ -101,7 +89,7 @@ class SimpleStatus {
* Get the result: passed or failed.
*/
public String getStateString() {
- if (state)
+ if (bSuccessful)
return "OK";
return "FAILED";
diff --git a/qadevOOo/runner/lib/Status.java b/qadevOOo/runner/lib/Status.java
index dcab93c7a0a8..ba28a4c11155 100644
--- a/qadevOOo/runner/lib/Status.java
+++ b/qadevOOo/runner/lib/Status.java
@@ -39,16 +39,16 @@ public class Status extends SimpleStatus {
/**
* Construct a status: use runState and state
* @param runState either PASSED, SKIPPED, etc.
- * @param state OK or FAILED.
+ * @param bSuccessful OK or FAILED.
*/
- public Status(RunState runState, boolean state ) {
- super(runState, state);
+ public Status(RunState runState, boolean bSuccessful ) {
+ super(runState, bSuccessful);
}
/**
* Construct a status: use own message and state.
* @param message An own message for the status.
- * @param state OK or FAILED.
+ * @param bSuccessful OK or FAILED.
*/
public Status(String message, boolean state) {
super( message, state );
@@ -58,11 +58,11 @@ public class Status extends SimpleStatus {
* This is a factory method for creating a Status representing normal
* activity termination.
*
- * @param state describes a test state (OK if state == true, FAILED
+ * @param bSuccessful describes a test state (OK if state == true, FAILED
* otherwise).
*/
- public static Status passed( boolean state ) {
- return new Status(RunState.PASSED, state );
+ public static Status passed( boolean bSuccessful ) {
+ return new Status(RunState.PASSED, bSuccessful );
}
/**
@@ -82,8 +82,8 @@ public class Status extends SimpleStatus {
* @param state describes a test state (OK if state == true, FAILED
* otherwise).
*/
- public static Status skipped( boolean state ) {
- return new Status( RunState.SKIPPED, state );
+ public static Status skipped( boolean bSuccessful ) {
+ return new Status( RunState.SKIPPED, bSuccessful );
}
@@ -95,7 +95,7 @@ public class Status extends SimpleStatus {
* @param reason describes why the activity failed
*/
public static Status failed(final String reason) {
- return new Status(reason, FAILED);
+ return new Status(reason, false/*bSuccessful*/);
}
/**
@@ -122,7 +122,7 @@ public class Status extends SimpleStatus {
* Checks whether the status state is failed.
*/
public boolean isFailed() {
- return !getState();
+ return !isSuccessful();
}
}