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,
String format,
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.
|
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
.NullPointerException
- if the given Condition
is null
.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
.NullPointerException
- if the given Condition
is null
.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
.NullPointerException
- if the given Condition
is null
.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
.NullPointerException
- if the given Condition
is null
.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
.NullPointerException
- if the given Condition
is null
.public void assertIsNotNull(Condition<?> condition, String format, Object... args)
Condition
is not null.condition
- the given Condition
.format
- as in String.format(String, Object...)
args
- as in String.format(String, Object...)
NullPointerException
- if the given Condition
is null
.Copyright © 2014–2019 AssertJ. All rights reserved.