public class Conditions
extends java.lang.Object
Condition.| Modifier and Type | Field and Description |
|---|---|
(package private) Failures |
failures |
private static Conditions |
INSTANCE |
| Constructor and Description |
|---|
Conditions() |
| Modifier and Type | Method and Description |
|---|---|
<T> void |
assertDoesNotHave(AssertionInfo info,
T actual,
Condition<? super T> condition)
Asserts that the actual value does not satisfy the given
. |
<T> void |
assertHas(AssertionInfo info,
T actual,
Condition<? super T> condition)
Asserts that the actual value satisfies the given
. |
<T> void |
assertIs(AssertionInfo info,
T actual,
Condition<? super T> condition)
Asserts that the actual value satisfies the given
. |
<T> void |
assertIsNot(AssertionInfo info,
T actual,
Condition<? super T> condition)
Asserts that the actual value does not satisfy the given
. |
void |
assertIsNotNull(Condition<?> condition)
Asserts the given
is not null. |
void |
assertIsNotNull(Condition<?> condition,
java.lang.String format,
java.lang.Object... args)
Asserts the given
is not null. |
<T> void |
assertSatisfies(AssertionInfo info,
T actual,
Condition<? super T> condition) |
static Conditions |
instance()
Returns the singleton instance of this class.
|
private static final Conditions INSTANCE
Failures failures
public static Conditions instance()
public <T> void assertIs(AssertionInfo info, T actual, Condition<? super T> condition)
Condition.T - the type of the actual value and the type of values that given Condition takes.info - contains information about the assertion.actual - the actual value.condition - the given Condition.java.lang.NullPointerException - if the given Condition is null.java.lang.AssertionError - if the actual value does not satisfy the given Condition.public <T> void assertIsNot(AssertionInfo info, T actual, Condition<? super T> condition)
Condition.T - the type of the actual value and the type of values that given Condition takes.info - contains information about the assertion.actual - the actual value.condition - the given Condition.java.lang.NullPointerException - if the given Condition is null.java.lang.AssertionError - if the actual value satisfies the given Condition.public <T> void assertHas(AssertionInfo info, T actual, Condition<? super T> condition)
Condition.T - the type of the actual value and the type of values that given Condition takes.info - contains information about the assertion.actual - the actual value.condition - the given Condition.java.lang.NullPointerException - if the given Condition is null.java.lang.AssertionError - if the actual value does not satisfy the given Condition.public <T> void assertDoesNotHave(AssertionInfo info, T actual, Condition<? super T> condition)
Condition.T - the type of the actual value and the type of values that given Condition takes.info - contains information about the assertion.actual - the actual value.condition - the given Condition.java.lang.NullPointerException - if the given Condition is null.java.lang.AssertionError - if the actual value satisfies the given Condition.public <T> void assertSatisfies(AssertionInfo info, T actual, Condition<? super T> condition)
public void assertIsNotNull(Condition<?> condition)
Condition is not null.condition - the given Condition.java.lang.NullPointerException - if the given Condition is null.public void assertIsNotNull(Condition<?> condition, java.lang.String format, java.lang.Object... args)
Condition is not null.condition - the given Condition.format - as in String.format(String, Object...)args - as in String.format(String, Object...)java.lang.NullPointerException - if the given Condition is null.