Package org.assertj.core.api
Class LongPredicateAssert
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<SELF,PRIMITIVE_PREDICATE>
-
- org.assertj.core.api.LongPredicateAssert
-
- All Implemented Interfaces:
Assert<LongPredicateAssert,LongPredicate>,Descriptable<LongPredicateAssert>,ExtensionPoints<LongPredicateAssert,LongPredicate>
public class LongPredicateAssert extends AbstractAssert<SELF,PRIMITIVE_PREDICATE>
Assertions forLongPredicate.- Since:
- 3.5.0
- Author:
- Filip Hrisafov
-
-
Field Summary
-
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself
-
-
Constructor Summary
Constructors Constructor Description LongPredicateAssert(LongPredicate actual)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LongPredicateAssertaccepts(long... values)Verifies thatLongPredicateevaluates all the given values totrue.protected SELFacceptsAllInternal(Iterable<? extends PRIMITIVE> values)protected SELFacceptsInternal(PRIMITIVE value)LongPredicateAssertrejects(long... values)Verifies thatLongPredicateevaluates all the given values tofalse.protected SELFrejectsAllInternal(Iterable<? extends PRIMITIVE> values)protected SELFrejectsInternal(PRIMITIVE value)-
Methods inherited from class org.assertj.core.api.AbstractAssert
as, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, 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, overridingErrorMessage, satisfies, setCustomRepresentation, throwAssertionError, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError
-
-
-
-
Constructor Detail
-
LongPredicateAssert
public LongPredicateAssert(LongPredicate actual)
-
-
Method Detail
-
accepts
public LongPredicateAssert accepts(long... values)
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
public LongPredicateAssert rejects(long... values)
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
protected SELF acceptsInternal(PRIMITIVE value)
-
rejectsInternal
protected SELF rejectsInternal(PRIMITIVE value)
-
acceptsAllInternal
protected SELF acceptsAllInternal(Iterable<? extends PRIMITIVE> values)
-
rejectsAllInternal
protected SELF rejectsAllInternal(Iterable<? extends PRIMITIVE> values)
-
-