| Modifier and Type | Class and Description |
|---|---|
| public static enum | Condition.
Describes the condition status after being evaluated. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Description | |
| private Predicate |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | Condition(Predicate<T>
the predicate, String Predicate used to build the condition.the description of this condition. description, Object... optional parameter if description is a format String. args)Creates a new |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public Description | Returns: the description of this condition with its status.the instance to evaluate the condition status against. actual)Returns the description of this condition with its status failed or success. |
| public Condition | describedAs(Description
the new description to set. newDescription)Implements org. |
| public Description | |
| public boolean | Returns: true if the given value satisfies this condition; false otherwise.the value to verify. value)Verifies that the given value satisfies this condition. |
| protected Condition. | |
| public String |
| description | back to summary |
|---|---|
| pack-priv Description description
| |
| predicate | back to summary |
|---|---|
| private Predicate<T> predicate | |
| Condition | back to summary |
|---|---|
| public Condition() Creates a new | |
| Condition | back to summary |
|---|---|
| public Condition(String description) Creates a new
| |
| Condition | back to summary |
|---|---|
| public Condition(Predicate<T> predicate, String description, Object... args) Creates a new
You must give a description, it will be used to build a nice error message when the condition fails, you can pass
args to build the description as in Example:
Error message example:
| |
| Condition | back to summary |
|---|---|
| public Condition(Description description) Creates a new
| |
| checkPredicate | back to summary |
|---|---|
| private void checkPredicate(Predicate<T> predicate) | |
| conditionDescriptionWithStatus | back to summary |
|---|---|
| public Description conditionDescriptionWithStatus(T actual) Returns the description of this condition with its status failed or success.
| |
| describedAs | back to summary |
|---|---|
| public Condition Implements org. Doc from org. Sets the description of the assertion that is going to be called after. You must set it before calling the assertion otherwise it is ignored as the failing assertion breaks the chained call by throwing an AssertionError.
This overloaded version of "describedAs" offers more flexibility than the one taking a
| |
| description | back to summary |
|---|---|
| public Description description() Returns the description of this condition.
| |
| matches | back to summary |
|---|---|
| public boolean matches(T value) Verifies that the given value satisfies this condition.
| |
| status | back to summary |
|---|---|
| protected Condition. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Condition. | |
| public final String | |
| public static final Condition. |
| Modifier and Type | Method and Description |
|---|---|
| public String | toString()
Overrides java. |
| public static Condition. | |
| public static Condition. |
| FAIL | back to summary |
|---|---|
| public static final Condition. | |
| label | back to summary |
|---|---|
| public final String label | |
| SUCCESS | back to summary |
|---|---|
| public static final Condition. | |
| Status | back to summary |
|---|---|
| private Status(String label) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists. | |
| valueOf | back to summary |
|---|---|
| public static Condition. | |
| values | back to summary |
|---|---|
| public static Condition. | |