Package org.assertj.core.internal
Class Conditions
java.lang.Object
org.assertj.core.internal.Conditions
Verifies that a value satisfies a
Condition
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> void
assertDoesNotHave
(AssertionInfo info, T actual, Condition<? super T> condition) Asserts that the actual value does not satisfy the given
.Condition
<T> void
assertHas
(AssertionInfo info, T actual, Condition<? super T> condition) Asserts that the actual value satisfies the given
.Condition
<T> void
assertIs
(AssertionInfo info, T actual, Condition<? super T> condition) Asserts that the actual value satisfies the given
.Condition
<T> void
assertIsNot
(AssertionInfo info, T actual, Condition<? super T> condition) Asserts that the actual value does not satisfy the given
.Condition
void
assertIsNotNull
(Condition<?> condition) Asserts the given
is not null.Condition
void
assertIsNotNull
(Condition<?> condition, String format, Object... args) Asserts the given
is not null.Condition
<T> void
assertSatisfies
(AssertionInfo info, T actual, Condition<? super T> condition) static Conditions
instance()
Returns the singleton instance of this class.
-
Field Details
-
INSTANCE
-
failures
Failures failures
-
-
Constructor Details
-
Conditions
Conditions()
-
-
Method Details
-
instance
Returns the singleton instance of this class.- Returns:
- the singleton instance of this class.
-
assertIs
Asserts that the actual value satisfies the given
.Condition
- Type Parameters:
T
- the type of the actual value and the type of values that givenCondition
takes.- Parameters:
info
- contains information about the assertion.actual
- the actual value.condition
- the givenCondition
.- Throws:
NullPointerException
- if the givenCondition
isnull
.AssertionError
- if the actual value does not satisfy the givenCondition
.
-
assertIsNot
Asserts that the actual value does not satisfy the given
.Condition
- Type Parameters:
T
- the type of the actual value and the type of values that givenCondition
takes.- Parameters:
info
- contains information about the assertion.actual
- the actual value.condition
- the givenCondition
.- Throws:
NullPointerException
- if the givenCondition
isnull
.AssertionError
- if the actual value satisfies the givenCondition
.
-
assertHas
Asserts that the actual value satisfies the given
.Condition
- Type Parameters:
T
- the type of the actual value and the type of values that givenCondition
takes.- Parameters:
info
- contains information about the assertion.actual
- the actual value.condition
- the givenCondition
.- Throws:
NullPointerException
- if the givenCondition
isnull
.AssertionError
- if the actual value does not satisfy the givenCondition
.
-
assertDoesNotHave
Asserts that the actual value does not satisfy the given
.Condition
- Type Parameters:
T
- the type of the actual value and the type of values that givenCondition
takes.- Parameters:
info
- contains information about the assertion.actual
- the actual value.condition
- the givenCondition
.- Throws:
NullPointerException
- if the givenCondition
isnull
.AssertionError
- if the actual value satisfies the givenCondition
.
-
assertSatisfies
-
assertIsNotNull
Asserts the given
is not null.Condition
- Parameters:
condition
- the givenCondition
.- Throws:
NullPointerException
- if the givenCondition
isnull
.
-
assertIsNotNull
Asserts the given
is not null.Condition
- Parameters:
condition
- the givenCondition
.format
- as inString.format(String, Object...)
args
- as inString.format(String, Object...)
- Throws:
NullPointerException
- if the givenCondition
isnull
.
-