Package org.assertj.core.internal
Class Conditions
- java.lang.Object
-
- org.assertj.core.internal.Conditions
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Failures
failures
private static Conditions
INSTANCE
-
Constructor Summary
Constructors Constructor Description Conditions()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <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 Detail
-
INSTANCE
private static final Conditions INSTANCE
-
failures
Failures failures
-
-
Method Detail
-
instance
public static Conditions instance()
Returns the singleton instance of this class.- Returns:
- the singleton instance of this class.
-
assertIs
public <T> void assertIs(AssertionInfo info, T actual, Condition<? super T> condition)
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
public <T> void assertIsNot(AssertionInfo info, T actual, Condition<? super T> condition)
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
public <T> void assertHas(AssertionInfo info, T actual, Condition<? super T> condition)
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
public <T> void assertDoesNotHave(AssertionInfo info, T actual, Condition<? super T> condition)
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
public <T> void assertSatisfies(AssertionInfo info, T actual, Condition<? super T> condition)
-
assertIsNotNull
public void assertIsNotNull(Condition<?> condition)
Asserts the given
is not null.Condition
- Parameters:
condition
- the givenCondition
.- Throws:
NullPointerException
- if the givenCondition
isnull
.
-
assertIsNotNull
public void assertIsNotNull(Condition<?> condition, String format, Object... args)
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
.
-
-