net.thucydides.core.model
Enum TestResult

Package class diagram package TestResult
java.lang.Object
  extended by java.lang.Enum<TestResult>
      extended by net.thucydides.core.model.TestResult
All Implemented Interfaces:
Serializable, Comparable<TestResult>

public enum TestResult
extends Enum<TestResult>

Acceptance test results. Records the possible outcomes of tests within an acceptance test case and of the overall acceptance test case itself.

Author:
johnsmart

Enum Constant Summary
FAILURE
          Test failure.
IGNORED
          The test or test case was deliberately ignored.
PENDING
          A pending test is one that has been specified but not yet implemented.
SKIPPED
          The test was not executed because a previous test in this test case failed.
SUCCESS
          The test or test case ran as expected.
 
Method Summary
static TestResult valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TestResult[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FAILURE

public static final TestResult FAILURE
Test failure. For a test case, this means one of the tests in the test case failed.


SUCCESS

public static final TestResult SUCCESS
The test or test case ran as expected.


IGNORED

public static final TestResult IGNORED
The test or test case was deliberately ignored. Tests can be ignored via the @Ignore annotation in JUnit, for example. Ignored tests are not considered the same as pending tests: a pending test is one that has been specified, but the corresponding code is yet to be implemented, whereas an ignored test can be a temporarily-deactivated test (during refactoring, for example).


SKIPPED

public static final TestResult SKIPPED
The test was not executed because a previous test in this test case failed. Doesn't make sense for a test case.


PENDING

public static final TestResult PENDING
A pending test is one that has been specified but not yet implemented. In a JUnit test case, you can use the (Thucydides) @Pending annotation to mark this. A pending test case is a test case that has at least one pending test.

Method Detail

values

public static TestResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TestResult c : TestResult.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TestResult valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2011-2012 Wakaleo Consulting. All Rights Reserved.