Package org.fest.assertions.internal
Class Conditions
- java.lang.Object
-
- org.fest.assertions.internal.Conditions
-
public class Conditions extends java.lang.Object
Verifies that a value satisfies a
.Condition
- Author:
- Alex Ruiz
-
-
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 the given
is not null.Condition
static Conditions
instance()
Returns the singleton instance of this class.
-
-
-
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:
java.lang.NullPointerException
- if the givenCondition
isnull
.java.lang.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:
java.lang.NullPointerException
- if the givenCondition
isnull
.java.lang.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:
java.lang.NullPointerException
- if the givenCondition
isnull
.java.lang.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:
java.lang.NullPointerException
- if the givenCondition
isnull
.java.lang.AssertionError
- if the actual value satisfies the givenCondition
.
-
-