public class LongPredicateAssert extends AbstractAssert<SELF,PRIMITIVE_PREDICATE>
LongPredicate
.actual, info, myself, throwUnsupportedExceptionOnEquals
Constructor and Description |
---|
LongPredicateAssert(LongPredicate actual) |
Modifier and Type | Method and Description |
---|---|
LongPredicateAssert |
accepts(long... values)
Verifies that
LongPredicate evaluates all the given values to true . |
protected SELF |
acceptsAllInternal(Iterable<? extends PRIMITIVE> values) |
protected SELF |
acceptsInternal(PRIMITIVE value) |
LongPredicateAssert |
rejects(long... values)
Verifies that
LongPredicate 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 LongPredicateAssert(LongPredicate actual)
public LongPredicateAssert accepts(long... values)
LongPredicate
evaluates all the given values to true
.
Example :
LongPredicate 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 LongPredicateAssert rejects(long... values)
LongPredicate
evaluates all the given values to false
.
Example :
LongPredicate 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.