Package org.assertj.core.api
Class IntPredicateAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<IntPredicateAssert,IntPredicate>
org.assertj.core.api.AbstractPredicateLikeAssert<IntPredicateAssert,IntPredicate,Integer>
org.assertj.core.api.IntPredicateAssert
- All Implemented Interfaces:
Assert<IntPredicateAssert,
,IntPredicate> Descriptable<IntPredicateAssert>
,ExtensionPoints<IntPredicateAssert,
IntPredicate>
public class IntPredicateAssert
extends AbstractPredicateLikeAssert<IntPredicateAssert,IntPredicate,Integer>
Assertions for
Predicate
.- Since:
- 3.5.0
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractPredicateLikeAssert
iterables, primitivePredicate
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, assertionErrorCreator, conditions, customRepresentation, info, myself, objects, printAssertionsDescription, throwUnsupportedExceptionOnEquals
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccepts
(int... values) Verifies thatIntPredicate
evaluates all the given values totrue
.static IntPredicateAssert
assertThatIntPredicate
(IntPredicate actual) rejects
(int... values) Verifies thatIntPredicate
evaluates all the given values tofalse
.toPredicate
(IntPredicate actual) Methods inherited from class org.assertj.core.api.AbstractPredicateLikeAssert
acceptsAllInternal, acceptsInternal, rejectsAllInternal, rejectsInternal
Methods inherited from class org.assertj.core.api.AbstractAssert
areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, 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, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withAssertionState, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
IntPredicateAssert
-
-
Method Details
-
assertThatIntPredicate
-
toPredicate
-
accepts
Verifies thatIntPredicate
evaluates all the given values totrue
.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);
- Parameters:
values
- values that the actualPredicate
should accept.- Returns:
- this assertion object.
- Throws:
AssertionError
- if the actualPredicate
does not accept all given values.
-
rejects
Verifies thatIntPredicate
evaluates all the given values tofalse
.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);
- Parameters:
values
- values that the actualPredicate
should reject.- Returns:
- this assertion object.
- Throws:
AssertionError
- if the actualPredicate
accepts one of the given values.
-