public class Conditions
extends java.lang.Object
Condition
.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 the given
is not null. |
static Conditions |
instance()
Returns the singleton instance of this class.
|
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
.Copyright © 2007–2018. All rights reserved.