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) Failuresfailuresprivate static ConditionsINSTANCE
-
Constructor Summary
Constructors Constructor Description Conditions()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> voidassertDoesNotHave(AssertionInfo info, T actual, Condition<? super T> condition)Asserts that the actual value does not satisfy the given.Condition<T> voidassertHas(AssertionInfo info, T actual, Condition<? super T> condition)Asserts that the actual value satisfies the given.Condition<T> voidassertIs(AssertionInfo info, T actual, Condition<? super T> condition)Asserts that the actual value satisfies the given.Condition<T> voidassertIsNot(AssertionInfo info, T actual, Condition<? super T> condition)Asserts that the actual value does not satisfy the given.ConditionvoidassertIsNotNull(Condition<?> condition)Asserts the givenis not null.ConditionvoidassertIsNotNull(Condition<?> condition, String format, Object... args)Asserts the givenis not null.Condition<T> voidassertSatisfies(AssertionInfo info, T actual, Condition<? super T> condition)static Conditionsinstance()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 givenConditiontakes.- Parameters:
info- contains information about the assertion.actual- the actual value.condition- the givenCondition.- Throws:
NullPointerException- if the givenConditionisnull.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 givenConditiontakes.- Parameters:
info- contains information about the assertion.actual- the actual value.condition- the givenCondition.- Throws:
NullPointerException- if the givenConditionisnull.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 givenConditiontakes.- Parameters:
info- contains information about the assertion.actual- the actual value.condition- the givenCondition.- Throws:
NullPointerException- if the givenConditionisnull.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 givenConditiontakes.- Parameters:
info- contains information about the assertion.actual- the actual value.condition- the givenCondition.- Throws:
NullPointerException- if the givenConditionisnull.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 givenis not null.Condition- Parameters:
condition- the givenCondition.- Throws:
NullPointerException- if the givenConditionisnull.
-
assertIsNotNull
public void assertIsNotNull(Condition<?> condition, String format, Object... args)
Asserts the givenis not null.Condition- Parameters:
condition- the givenCondition.format- as inString.format(String, Object...)args- as inString.format(String, Object...)- Throws:
NullPointerException- if the givenConditionisnull.
-
-