Package org.assertj.core.api
Class DoublePredicateAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<DoublePredicateAssert,DoublePredicate>
org.assertj.core.api.DoublePredicateAssert
- All Implemented Interfaces:
Assert<DoublePredicateAssert,,DoublePredicate> Descriptable<DoublePredicateAssert>,ExtensionPoints<DoublePredicateAssert,DoublePredicate>
Assertions for
Predicate.- Since:
- 3.5.0
- Author:
- Filip Hrisafov
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccepts(double... values) Verifies thatDoublePredicateevaluates all the given values totrue.protected DoublePredicateAssertacceptsAllInternal(Iterable<? extends Double> values) protected DoublePredicateAssertacceptsInternal(Double value) static DoublePredicateAssertrejects(double... values) Verifies thatDoublePredicateevaluates all the given values tofalse.protected DoublePredicateAssertrejectsAllInternal(Iterable<? extends Double> values) protected DoublePredicateAssertrejectsInternal(Double value) Methods inherited from class org.assertj.core.api.AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
DoublePredicateAssert
-
-
Method Details
-
assertThatDoublePredicate
-
accepts
Verifies thatDoublePredicateevaluates all the given values totrue.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);- Parameters:
values- values that the actualPredicateshould accept.- Returns:
- this assertion object.
- Throws:
AssertionError- if the actualPredicatedoes not accept all given values.
-
rejects
Verifies thatDoublePredicateevaluates all the given values tofalse.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);- Parameters:
values- values that the actualPredicateshould reject.- Returns:
- this assertion object.
- Throws:
AssertionError- if the actualPredicateaccepts one of the given values.
-
acceptsInternal
-
rejectsInternal
-
acceptsAllInternal
-
rejectsAllInternal
-