Package org.assertj.core.api
Class LongPredicateAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<LongPredicateAssert,LongPredicate>
org.assertj.core.api.LongPredicateAssert
- All Implemented Interfaces:
Assert<LongPredicateAssert,,LongPredicate> Descriptable<LongPredicateAssert>,ExtensionPoints<LongPredicateAssert,LongPredicate>
Assertions for
LongPredicate.- 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(long... values) Verifies thatLongPredicateevaluates all the given values totrue.protected LongPredicateAssertacceptsAllInternal(Iterable<? extends Long> values) protected LongPredicateAssertacceptsInternal(Long value) static LongPredicateAssertassertThatLongPredicate(LongPredicate actual) rejects(long... values) Verifies thatLongPredicateevaluates all the given values tofalse.protected LongPredicateAssertrejectsAllInternal(Iterable<? extends Long> values) protected LongPredicateAssertrejectsInternal(Long 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
-
LongPredicateAssert
-
-
Method Details
-
assertThatLongPredicate
-
accepts
Verifies thatLongPredicateevaluates all the given values totrue.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);- Parameters:
values- values that the actualPredicateshould accept.- Returns:
- this assertion object.
- Throws:
AssertionError- if the actualPredicatedoes not accept all given values.
-
rejects
Verifies thatLongPredicateevaluates all the given values tofalse.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);- 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
-