public class IntPredicateAssert extends AbstractAssert<SELF,PRIMITIVE_PREDICATE>
Predicate
.actual, info, myself, throwUnsupportedExceptionOnEquals
Constructor and Description |
---|
IntPredicateAssert(IntPredicate actual) |
Modifier and Type | Method and Description |
---|---|
IntPredicateAssert |
accepts(int... values)
Verifies that
IntPredicate evaluates all the given values to true . |
protected SELF |
acceptsAllInternal(Iterable<? extends PRIMITIVE> values) |
protected SELF |
acceptsInternal(PRIMITIVE value) |
IntPredicateAssert |
rejects(int... values)
Verifies that
IntPredicate evaluates all the given values to false . |
protected SELF |
rejectsAllInternal(Iterable<? extends PRIMITIVE> values) |
protected SELF |
rejectsInternal(PRIMITIVE value) |
as, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError
public IntPredicateAssert(IntPredicate actual)
public IntPredicateAssert accepts(int... values)
IntPredicate
evaluates all the given values to true
.
Example :
IntPredicate evenNumber = n -> n % 2 == 0;
// assertion succeeds:
assertThat(evenNumber).accepts(2, 4, 6);
// assertion fails because of 3:
assertThat(evenNumber).accepts(2, 3, 4);
values
- values that the actual Predicate
should accept.AssertionError
- if the actual Predicate
does not accept all given values.public IntPredicateAssert rejects(int... values)
IntPredicate
evaluates all the given values to false
.
Example :
IntPredicate evenNumber = n -> n % 2 == 0;
// assertion succeeds:
assertThat(evenNumber).rejects(1, 3, 5);
// assertion fails because of 2:
assertThat(evenNumber).rejects(1, 2, 3);
values
- values that the actual Predicate
should reject.AssertionError
- if the actual Predicate
accepts one of the given values.protected SELF acceptsInternal(PRIMITIVE value)
protected SELF rejectsInternal(PRIMITIVE value)
protected SELF acceptsAllInternal(Iterable<? extends PRIMITIVE> values)
protected SELF rejectsAllInternal(Iterable<? extends PRIMITIVE> values)
Copyright © 2014–2019 AssertJ. All rights reserved.