SELF
- the "self" type of this assertion class. Please read "Emulating
'self types' using Java Generics to simplify fluent API implementation" for more details.ACTUAL
- the type of the "actual" value.public interface ExtensionPoints<SELF extends ExtensionPoints<SELF,ACTUAL>,ACTUAL>
Modifier and Type | Method and Description |
---|---|
SELF |
doesNotHave(Condition<? super ACTUAL> condition)
Verifies that the actual value does not satisfy the given condition.
|
SELF |
has(Condition<? super ACTUAL> condition)
Verifies that the actual value satisfies the given condition.
|
SELF |
is(Condition<? super ACTUAL> condition)
Verifies that the actual value satisfies the given condition.
|
SELF |
isNot(Condition<? super ACTUAL> condition)
Verifies that the actual value does not satisfy the given condition.
|
SELF |
satisfies(Condition<? super ACTUAL> condition)
Verifies that the actual value satisfies the given condition.
|
SELF is(Condition<? super ACTUAL> condition)
has(Condition)
.condition
- the given condition.this ExtensionPoints
object.NullPointerException
- if the given condition is null
.AssertionError
- if the actual value does not satisfy the given condition.is(Condition)
SELF isNot(Condition<? super ACTUAL> condition)
doesNotHave(Condition)
.condition
- the given condition.this ExtensionPoints
object.NullPointerException
- if the given condition is null
.AssertionError
- if the actual value satisfies the given condition.isNot(Condition)
SELF has(Condition<? super ACTUAL> condition)
is(Condition)
.condition
- the given condition.this ExtensionPoints
object.NullPointerException
- if the given condition is null
.AssertionError
- if the actual value does not satisfy the given condition.is(Condition)
SELF doesNotHave(Condition<? super ACTUAL> condition)
isNot(Condition)
.condition
- the given condition.this ExtensionPoints
object.NullPointerException
- if the given condition is null
.AssertionError
- if the actual value satisfies the given condition.isNot(Condition)
SELF satisfies(Condition<? super ACTUAL> condition)
is(Condition)
.
Example:
// Given
Condition<String> fairyTale = new Condition<>(s -> s.startsWith("Once upon a time"), "fairy tale start");
// When
String littleRedCap = "Once upon a time there was a dear little girl ...";
// Then
assertThat(littleRedCap).satisfies(fairyTale);
condition
- the given condition.this ExtensionPoints
object.NullPointerException
- if the given condition is null
.AssertionError
- if the actual value does not satisfy the given condition.is(Condition)
Copyright © 2014–2019 AssertJ. All rights reserved.