public class DoublePredicateAssert extends AbstractAssert<SELF,PRIMITIVE_PREDICATE>
Predicate
.actual, info, myself, throwUnsupportedExceptionOnEquals
Constructor and Description |
---|
DoublePredicateAssert(DoublePredicate actual) |
Modifier and Type | Method and Description |
---|---|
DoublePredicateAssert |
accepts(double... values)
Verifies that
DoublePredicate evaluates all the given values to true . |
protected SELF |
acceptsAllInternal(Iterable<? extends PRIMITIVE> values) |
protected SELF |
acceptsInternal(PRIMITIVE value) |
DoublePredicateAssert |
rejects(double... values)
Verifies that
DoublePredicate 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 DoublePredicateAssert(DoublePredicate actual)
public DoublePredicateAssert accepts(double... values)
DoublePredicate
evaluates all the given values to true
.
Example :
DoublePredicate tallSize = size -> size > 1.90;
// assertion succeeds:
assertThat(tallSize).accepts(1.95, 2.00, 2.05);
// assertion fails:
assertThat(tallSize).accepts(1.85, 1.95, 2.05);
values
- values that the actual Predicate
should accept.AssertionError
- if the actual Predicate
does not accept all given values.public DoublePredicateAssert rejects(double... values)
DoublePredicate
evaluates all the given values to false
.
Example :
DoublePredicate tallSize = size -> size > 1.90;
// assertion succeeds:
assertThat(tallSize).rejects(1.75, 1.80, 1.85);
// assertion fails because of 1.90 size:
assertThat(tallSize).rejects(1.80, 1.85, 1.90);
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.