public interface WithAssumptions
Modifier and Type | Method and Description |
---|---|
default AtomicBooleanAssert |
assumeThat(AtomicBoolean actual)
Creates a new instance of
assumption. |
default AtomicIntegerAssert |
assumeThat(AtomicInteger actual)
Creates a new instance of
assumption. |
default AtomicIntegerArrayAssert |
assumeThat(AtomicIntegerArray actual)
Creates int[] assumption for
AtomicIntegerArray . |
default <OBJECT> AtomicIntegerFieldUpdaterAssert<OBJECT> |
assumeThat(AtomicIntegerFieldUpdater<OBJECT> actual)
Creates a new instance of
assumption. |
default AtomicLongAssert |
assumeThat(AtomicLong actual)
Creates a new instance of
assumption. |
default AtomicLongArrayAssert |
assumeThat(AtomicLongArray actual)
Creates a new instance of
assumption. |
default <OBJECT> AtomicLongFieldUpdaterAssert<OBJECT> |
assumeThat(AtomicLongFieldUpdater<OBJECT> actual)
Creates a new instance of
assumption. |
default <VALUE> AtomicMarkableReferenceAssert<VALUE> |
assumeThat(AtomicMarkableReference<VALUE> actual)
Creates a new instance of
assumption. |
default <VALUE> AtomicReferenceAssert<VALUE> |
assumeThat(AtomicReference<VALUE> actual)
Creates a new instance of
assumption. |
default <ELEMENT> AtomicReferenceArrayAssert<ELEMENT> |
assumeThat(AtomicReferenceArray<ELEMENT> actual)
Creates a new instance of
assumption. |
default <FIELD,OBJECT> |
assumeThat(AtomicReferenceFieldUpdater<OBJECT,FIELD> actual)
Creates a new instance of
assumption. |
default <VALUE> AtomicStampedReferenceAssert<VALUE> |
assumeThat(AtomicStampedReference<VALUE> actual)
Creates a new instance of
assumption. |
default AbstractBigDecimalAssert<?> |
assumeThat(BigDecimal actual)
Creates a new instance of
assumption. |
default AbstractBigIntegerAssert<?> |
assumeThat(BigInteger actual)
Creates a new instance of
assumption. |
default AbstractBooleanAssert<?> |
assumeThat(boolean actual)
Creates a new instance of
assumption. |
default AbstractBooleanAssert<?> |
assumeThat(Boolean actual)
Creates a new instance of
assumption. |
default AbstractBooleanArrayAssert<?> |
assumeThat(boolean[] actual)
Creates a new instance of
assumption. |
default AbstractByteAssert<?> |
assumeThat(byte actual)
Creates a new instance of
assumption. |
default AbstractByteAssert<?> |
assumeThat(Byte actual)
Creates a new instance of
assumption. |
default AbstractByteArrayAssert<?> |
assumeThat(byte[] actual)
Creates a new instance of
assumption. |
default AbstractCharacterAssert<?> |
assumeThat(char actual)
Creates a new instance of
assumption. |
default AbstractCharArrayAssert<?> |
assumeThat(char[] actual)
Creates a new instance of
assumption. |
default AbstractCharacterAssert<?> |
assumeThat(Character actual)
Creates a new instance of
assumption. |
default AbstractCharSequenceAssert<?,? extends CharSequence> |
assumeThat(CharSequence actual)
Creates a new instance of
assumption. |
default AbstractClassAssert<?> |
assumeThat(Class<?> actual)
Creates a new instance of
assumption. |
default <RESULT> CompletableFutureAssert<RESULT> |
assumeThat(CompletableFuture<RESULT> future)
Creates a new instance of
CompletableFutureAssert assumption. |
default <RESULT> CompletableFutureAssert<RESULT> |
assumeThat(CompletionStage<RESULT> actual)
Creates a new instance of
CompletableFutureAssert assumption for a CompletionStage
by converting it to a CompletableFuture and returning a CompletableFutureAssert . |
default AbstractDateAssert<?> |
assumeThat(Date actual)
Creates a new instance of
assumption. |
default AbstractDoubleAssert<?> |
assumeThat(double actual)
Creates a new instance of
assumption. |
default AbstractDoubleAssert<?> |
assumeThat(Double actual)
Creates a new instance of
assumption. |
default AbstractDoubleArrayAssert<?> |
assumeThat(double[] actual)
Creates a new instance of
assumption. |
default DoublePredicateAssert |
assumeThat(DoublePredicate doublePredicate)
Creates a new instance of
DoublePredicateAssert assumption. |
default AbstractListAssert<?,List<? extends Double>,Double,ObjectAssert<Double>> |
assumeThat(DoubleStream doubleStream)
Creates a new instance of
assumption from the given DoubleStream . |
default AbstractFileAssert<?> |
assumeThat(File actual)
Creates a new instance of
assumption. |
default AbstractFloatAssert<?> |
assumeThat(float actual)
Creates a new instance of
assumption. |
default AbstractFloatAssert<?> |
assumeThat(Float actual)
Creates a new instance of
assumption. |
default AbstractFloatArrayAssert<?> |
assumeThat(float[] actual)
Creates a new instance of
assumption. |
default <RESULT> AbstractFutureAssert<?,? extends Future<? extends RESULT>,RESULT> |
assumeThat(Future<RESULT> actual)
Create assertion for
FutureAssert assumption. |
default AbstractInputStreamAssert<?,? extends InputStream> |
assumeThat(InputStream actual)
Creates a new instance of
assumption. |
default AbstractInstantAssert<?> |
assumeThat(Instant instant)
Creates a new instance of
assumption. |
default AbstractIntegerAssert<?> |
assumeThat(int actual)
Creates a new instance of
assumption. |
default AbstractIntArrayAssert<?> |
assumeThat(int[] actual)
Creates a new instance of
assumption. |
default AbstractIntegerAssert<?> |
assumeThat(Integer actual)
Creates a new instance of
assumption. |
default IntPredicateAssert |
assumeThat(IntPredicate intPredicate)
Creates a new instance of
IntPredicateAssert assumption. |
default AbstractListAssert<?,List<? extends Integer>,Integer,ObjectAssert<Integer>> |
assumeThat(IntStream intStream)
Creates a new instance of
assumption from the given IntStream . |
default <ELEMENT> ProxyableIterableAssert<ELEMENT> |
assumeThat(Iterable<? extends ELEMENT> actual)
Creates a new instance of
assumption. |
default <ELEMENT> IteratorAssert<ELEMENT> |
assumeThat(Iterator<? extends ELEMENT> actual)
Creates a new instance of
assumption. |
default <ELEMENT> FactoryBasedNavigableListAssert<ProxyableListAssert<ELEMENT>,List<? extends ELEMENT>,ELEMENT,ObjectAssert<ELEMENT>> |
assumeThat(List<? extends ELEMENT> list)
Creates a new instance of
assumption. |
default AbstractLocalDateAssert<?> |
assumeThat(LocalDate localDate)
Creates a new instance of
assumption. |
default AbstractLocalDateTimeAssert<?> |
assumeThat(LocalDateTime localDateTime)
Creates a new instance of
assumption. |
default AbstractLocalTimeAssert<?> |
assumeThat(LocalTime localTime)
Creates a new instance of
assumption. |
default AbstractLongAssert<?> |
assumeThat(long actual)
Creates a new instance of
assumption. |
default AbstractLongAssert<?> |
assumeThat(Long actual)
Creates a new instance of
assumption. |
default AbstractLongArrayAssert<?> |
assumeThat(long[] actual)
Creates a new instance of
assumption. |
default LongPredicateAssert |
assumeThat(LongPredicate longPredicate)
Creates a new instance of
LongPredicateAssert assumption. |
default AbstractListAssert<?,List<? extends Long>,Long,ObjectAssert<Long>> |
assumeThat(LongStream longStream)
Creates a new instance of
assumption from the given LongStream . |
default <K,V> AbstractMapAssert<?,?,K,V> |
assumeThat(Map<K,V> actual)
Creates a new instance of
assumption. |
default AbstractOffsetDateTimeAssert<?> |
assumeThat(OffsetDateTime offsetDateTime)
Creates a new instance of
assumption. |
default AbstractOffsetTimeAssert<?> |
assumeThat(OffsetTime offsetTime)
Creates a new instance of
assumption. |
default <VALUE> OptionalAssert<VALUE> |
assumeThat(Optional<VALUE> optional)
Creates a new instance of
OptionalAssert assumption. |
default OptionalDoubleAssert |
assumeThat(OptionalDouble optionalDouble)
Creates a new instance of
assumption. |
default OptionalIntAssert |
assumeThat(OptionalInt optionalInt)
Creates a new instance of
assumption. |
default OptionalLongAssert |
assumeThat(OptionalLong optionalLong)
Creates a new instance of
assumption. |
default AbstractPathAssert<?> |
assumeThat(Path actual)
Creates a new instance of
assumption. |
default <T> ProxyablePredicateAssert<T> |
assumeThat(Predicate<T> predicate)
Creates a new instance of
PredicateAssert assumption. |
default AbstractShortAssert<?> |
assumeThat(short actual)
Creates a new instance of
assumption. |
default AbstractShortAssert<?> |
assumeThat(Short actual)
Creates a new instance of
assumption. |
default AbstractShortArrayAssert<?> |
assumeThat(short[] actual)
Creates a new instance of
assumption. |
default <ELEMENT> AbstractListAssert<?,List<? extends ELEMENT>,ELEMENT,ObjectAssert<ELEMENT>> |
assumeThat(Stream<? extends ELEMENT> stream)
Creates a new instance of
assumption from the given Stream . |
default AbstractStringAssert<?> |
assumeThat(String actual)
Creates a new instance of
assumption. |
default AbstractCharSequenceAssert<?,? extends CharSequence> |
assumeThat(StringBuffer actual)
Creates a new instance of
assumption from a StringBuffer . |
default AbstractCharSequenceAssert<?,? extends CharSequence> |
assumeThat(StringBuilder actual)
Creates a new instance of
assumption from a StringBuilder . |
default <T> ProxyableObjectAssert<T> |
assumeThat(T actual)
Creates a new instance of
assumption. |
default <T extends Comparable<? super T>> |
assumeThat(T actual)
Creates a new instance of
assumption. |
default <T> ProxyableObjectArrayAssert<T> |
assumeThat(T[] actual)
Creates a new instance of
assumption. |
default AbstractThrowableAssert<?,? extends Throwable> |
assumeThat(Throwable actual)
Creates a new instance of
assumption. |
default AbstractUriAssert<?> |
assumeThat(URI uri)
Creates a new instance of
assumption. |
default AbstractUrlAssert<?> |
assumeThat(URL url)
Creates a new instance of
assumption. |
default AbstractZonedDateTimeAssert<?> |
assumeThat(ZonedDateTime zonedDateTime)
Creates a new instance of
assumption. |
default AbstractThrowableAssert<?,? extends Throwable> |
assumeThatCode(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable)
Allows to capture and then assume on a
Throwable (easier done with lambdas). |
default <T> ProxyableObjectAssert<T> |
assumeThatObject(T actual)
Creates a new instance of
for any object. |
default AbstractThrowableAssert<?,? extends Throwable> |
assumeThatThrownBy(ThrowableAssert.ThrowingCallable shouldRaiseThrowable)
Allows to capture and then assume on a
Throwable (easier done with lambdas). |
default <T> ProxyableObjectArrayAssert<T> assumeThat(T[] actual)
ObjectArrayAssert
assumption.T
- the type of elements.actual
- the actual value.default <K,V> AbstractMapAssert<?,?,K,V> assumeThat(Map<K,V> actual)
MapAssert
assumption.K
- the type of keys in the map.V
- the type of values in the map.actual
- the actual value.default AbstractShortAssert<?> assumeThat(short actual)
ShortAssert
assumption.actual
- the actual value.default AbstractLongAssert<?> assumeThat(long actual)
LongAssert
assumption.actual
- the actual value.default AbstractLongAssert<?> assumeThat(Long actual)
LongAssert
assumption.actual
- the actual value.default AbstractLongArrayAssert<?> assumeThat(long[] actual)
LongArrayAssert
assumption.actual
- the actual value.default <T> ProxyableObjectAssert<T> assumeThat(T actual)
ObjectAssert
assumption.T
- the type of the actual value.actual
- the actual value.default AbstractStringAssert<?> assumeThat(String actual)
StringAssert
assumption.actual
- the actual value.default AbstractDateAssert<?> assumeThat(Date actual)
DateAssert
assumption.actual
- the actual value.default AbstractThrowableAssert<?,? extends Throwable> assumeThat(Throwable actual)
ThrowableAssert
assumption.actual
- the actual value.default AbstractBigDecimalAssert<?> assumeThat(BigDecimal actual)
BigDecimalAssert
assumption.actual
- the actual value.default AbstractBigIntegerAssert<?> assumeThat(BigInteger actual)
BigIntegerAssert
assumption.actual
- the actual value.default AtomicBooleanAssert assumeThat(AtomicBoolean actual)
AtomicBooleanAssert
assumption.actual
- the actual value.default AtomicIntegerAssert assumeThat(AtomicInteger actual)
AtomicIntegerAssert
assumption.actual
- the actual value.default AtomicIntegerArrayAssert assumeThat(AtomicIntegerArray actual)
AtomicIntegerArray
.actual
- the actual value.default <OBJECT> AtomicIntegerFieldUpdaterAssert<OBJECT> assumeThat(AtomicIntegerFieldUpdater<OBJECT> actual)
AtomicIntegerFieldUpdaterAssert
assumption.OBJECT
- the type of the object holding the updatable field.actual
- the actual value.default AtomicLongAssert assumeThat(AtomicLong actual)
AtomicLongAssert
assumption.actual
- the actual value.default AtomicLongArrayAssert assumeThat(AtomicLongArray actual)
AtomicLongArrayAssert
assumption.actual
- the actual value.default <OBJECT> AtomicLongFieldUpdaterAssert<OBJECT> assumeThat(AtomicLongFieldUpdater<OBJECT> actual)
AtomicLongFieldUpdaterAssert
assumption.OBJECT
- the type of the object holding the updatable field.actual
- the actual value.default <VALUE> AtomicReferenceAssert<VALUE> assumeThat(AtomicReference<VALUE> actual)
AtomicReferenceAssert
assumption.VALUE
- the type of the value contained in the AtomicReference
.actual
- the actual value.default <ELEMENT> AtomicReferenceArrayAssert<ELEMENT> assumeThat(AtomicReferenceArray<ELEMENT> actual)
AtomicReferenceArrayAssert
assumption.ELEMENT
- the type of the value contained in the AtomicReferenceArray
.actual
- the actual value.default <FIELD,OBJECT> AtomicReferenceFieldUpdaterAssert<FIELD,OBJECT> assumeThat(AtomicReferenceFieldUpdater<OBJECT,FIELD> actual)
AtomicReferenceFieldUpdaterAssert
assumption.FIELD
- the type of the field which gets updated by the AtomicReferenceFieldUpdater
.OBJECT
- the type of the object holding the updatable field.actual
- the actual value.default <VALUE> AtomicMarkableReferenceAssert<VALUE> assumeThat(AtomicMarkableReference<VALUE> actual)
AtomicMarkableReferenceAssert
assumption.VALUE
- the type of the value contained in the AtomicMarkableReference
.actual
- the actual value.default <VALUE> AtomicStampedReferenceAssert<VALUE> assumeThat(AtomicStampedReference<VALUE> actual)
AtomicStampedReferenceAssert
assumption.VALUE
- the type of the value contained in the AtomicStampedReference
.actual
- the actual value.default AbstractCharSequenceAssert<?,? extends CharSequence> assumeThat(CharSequence actual)
CharSequenceAssert
assumption.actual
- the actual value.default AbstractCharSequenceAssert<?,? extends CharSequence> assumeThat(StringBuilder actual)
CharSequenceAssert
assumption from a StringBuilder
.actual
- the actual value.default AbstractCharSequenceAssert<?,? extends CharSequence> assumeThat(StringBuffer actual)
CharSequenceAssert
assumption from a StringBuffer
.actual
- the actual value.default AbstractShortArrayAssert<?> assumeThat(short[] actual)
ShortArrayAssert
assumption.actual
- the actual value.default AbstractShortAssert<?> assumeThat(Short actual)
ShortAssert
assumption.actual
- the actual value.default AbstractClassAssert<?> assumeThat(Class<?> actual)
CharSequenceAssert
assumption.actual
- the actual value.default AbstractCharacterAssert<?> assumeThat(Character actual)
CharacterAssert
assumption.actual
- the actual value.default AbstractCharArrayAssert<?> assumeThat(char[] actual)
CharArrayAssert
assumption.actual
- the actual value.default AbstractCharacterAssert<?> assumeThat(char actual)
CharacterAssert
assumption.actual
- the actual value.default <T extends Comparable<? super T>> AbstractComparableAssert<?,T> assumeThat(T actual)
GenericComparableAssert
assumption.T
- the type of actual.actual
- the actual value.default <ELEMENT> ProxyableIterableAssert<ELEMENT> assumeThat(Iterable<? extends ELEMENT> actual)
IterableAssert
assumption.ELEMENT
- the type of elements.actual
- the actual value.default <ELEMENT> IteratorAssert<ELEMENT> assumeThat(Iterator<? extends ELEMENT> actual)
IteratorAssert
assumption.
Breaking change in version 3.12.0: this method does not return anymore an ProxyableIterableAssert
but an IteratorAssert
.
ELEMENT
- the type of elements.actual
- the actual value.default AbstractBooleanAssert<?> assumeThat(Boolean actual)
BooleanAssert
assumption.actual
- the actual value.default AbstractBooleanArrayAssert<?> assumeThat(boolean[] actual)
BooleanArrayAssert
assumption.actual
- the actual value.default AbstractByteAssert<?> assumeThat(byte actual)
ByteAssert
assumption.actual
- the actual value.default AbstractByteAssert<?> assumeThat(Byte actual)
ByteAssert
assumption.actual
- the actual value.default AbstractByteArrayAssert<?> assumeThat(byte[] actual)
ByteArrayAssert
assumption.actual
- the actual value.default AbstractBooleanAssert<?> assumeThat(boolean actual)
BooleanAssert
assumption.actual
- the actual value.default AbstractFloatAssert<?> assumeThat(float actual)
FloatAssert
assumption.actual
- the actual value.default AbstractInputStreamAssert<?,? extends InputStream> assumeThat(InputStream actual)
InputStreamAssert
assumption.actual
- the actual value.default AbstractFileAssert<?> assumeThat(File actual)
FileAssert
assumption.actual
- the actual value.default <RESULT> AbstractFutureAssert<?,? extends Future<? extends RESULT>,RESULT> assumeThat(Future<RESULT> actual)
FutureAssert
assumption.RESULT
- the type of the value contained in the Future
.actual
- the actual value.default AbstractPathAssert<?> assumeThat(Path actual)
PathAssert
assumption.actual
- the actual value.default AbstractIntArrayAssert<?> assumeThat(int[] actual)
IntArrayAssert
assumption.actual
- the actual value.default AbstractFloatAssert<?> assumeThat(Float actual)
FloatAssert
assumption.actual
- the actual value.default AbstractIntegerAssert<?> assumeThat(int actual)
IntegerAssert
assumption.actual
- the actual value.default AbstractFloatArrayAssert<?> assumeThat(float[] actual)
FloatArrayAssert
assumption.actual
- the actual value.default AbstractIntegerAssert<?> assumeThat(Integer actual)
IntegerAssert
assumption.actual
- the actual value.default AbstractDoubleAssert<?> assumeThat(double actual)
DoubleAssert
assumption.actual
- the actual value.default AbstractDoubleAssert<?> assumeThat(Double actual)
DoubleAssert
assumption.actual
- the actual value.default <ELEMENT> FactoryBasedNavigableListAssert<ProxyableListAssert<ELEMENT>,List<? extends ELEMENT>,ELEMENT,ObjectAssert<ELEMENT>> assumeThat(List<? extends ELEMENT> list)
ListAssert
assumption.ELEMENT
- the type of elements.list
- the actual value.default <ELEMENT> AbstractListAssert<?,List<? extends ELEMENT>,ELEMENT,ObjectAssert<ELEMENT>> assumeThat(Stream<? extends ELEMENT> stream)
ListAssert
assumption from the given Stream
.ELEMENT
- the type of elements.stream
- the Stream to testdefault AbstractListAssert<?,List<? extends Double>,Double,ObjectAssert<Double>> assumeThat(DoubleStream doubleStream)
ListAssert
assumption from the given DoubleStream
.doubleStream
- the actual value.default AbstractListAssert<?,List<? extends Long>,Long,ObjectAssert<Long>> assumeThat(LongStream longStream)
ListAssert
assumption from the given LongStream
.longStream
- the actual value.default AbstractListAssert<?,List<? extends Integer>,Integer,ObjectAssert<Integer>> assumeThat(IntStream intStream)
ListAssert
assumption from the given IntStream
.intStream
- the actual value.default AbstractDoubleArrayAssert<?> assumeThat(double[] actual)
DoubleArrayAssert
assumption.actual
- the actual value.default AbstractZonedDateTimeAssert<?> assumeThat(ZonedDateTime zonedDateTime)
ZonedDateTimeAssert
assumption.zonedDateTime
- the actual value.default <RESULT> CompletableFutureAssert<RESULT> assumeThat(CompletableFuture<RESULT> future)
CompletableFutureAssert
assumption.RESULT
- the CompletableFuture wrapped type.future
- the CompletableFuture to testdefault <RESULT> CompletableFutureAssert<RESULT> assumeThat(CompletionStage<RESULT> actual)
CompletableFutureAssert
assumption for a CompletionStage
by converting it to a CompletableFuture
and returning a CompletableFutureAssert
.
If the given CompletionStage
is null, the CompletableFuture
in the returned CompletableFutureAssert
will also be null.
RESULT
- the CompletableFuture wrapped type.actual
- the CompletableFuture to testdefault <VALUE> OptionalAssert<VALUE> assumeThat(Optional<VALUE> optional)
OptionalAssert
assumption.VALUE
- the Optional wrapped type.optional
- the Optional to testdefault OptionalDoubleAssert assumeThat(OptionalDouble optionalDouble)
OptionalDoubleAssert
assumption.optionalDouble
- the actual value.default OptionalIntAssert assumeThat(OptionalInt optionalInt)
OptionalIntAssert
assumption.optionalInt
- the actual value.default OptionalLongAssert assumeThat(OptionalLong optionalLong)
OptionalLongAssert
assumption.optionalLong
- the actual value.default AbstractLocalDateTimeAssert<?> assumeThat(LocalDateTime localDateTime)
LocalDateTimeAssert
assumption.localDateTime
- the actual value.default AbstractLocalDateAssert<?> assumeThat(LocalDate localDate)
LocalDateAssert
assumption.localDate
- the actual value.default AbstractLocalTimeAssert<?> assumeThat(LocalTime localTime)
LocalTimeAssert
assumption.localTime
- the actual value.default AbstractInstantAssert<?> assumeThat(Instant instant)
InstantAssert
assumption.instant
- the actual value.default AbstractOffsetTimeAssert<?> assumeThat(OffsetTime offsetTime)
OffsetTimeAssert
assumption.offsetTime
- the actual value.default AbstractOffsetDateTimeAssert<?> assumeThat(OffsetDateTime offsetDateTime)
OffsetDateTimeAssert
assumption.offsetDateTime
- the actual value.default AbstractThrowableAssert<?,? extends Throwable> assumeThatThrownBy(ThrowableAssert.ThrowingCallable shouldRaiseThrowable)
Throwable
(easier done with lambdas).
Example :
@Test
public void testException() {
assumeThatThrownBy(() -> { throw new Exception("boom!") }).isInstanceOf(Exception.class)
.hasMessageContaining("boom");
}
shouldRaiseThrowable
- The ThrowableAssert.ThrowingCallable
or lambda with the code that should raise the throwable.default AbstractThrowableAssert<?,? extends Throwable> assumeThatCode(ThrowableAssert.ThrowingCallable shouldRaiseOrNotThrowable)
Throwable
(easier done with lambdas).
Example :
ThrowingCallable callable = () -> {
throw new Exception("boom!");
};
// assertion succeeds
assumeThatCode(callable).isInstanceOf(Exception.class)
.hasMessageContaining("boom");
// assertion fails
assumeThatCode(callable).doesNotThrowAnyException();
This method was not named assumeThat
because the java compiler reported it ambiguous when used directly with a lambda :(
shouldRaiseOrNotThrowable
- The ThrowableAssert.ThrowingCallable
or lambda with the code that should raise the throwable.default <T> ProxyableObjectAssert<T> assumeThatObject(T actual)
ObjectAssert
for any object.
This overload is useful, when an overloaded method of assertThat(...) takes precedence over the generic assumeThat(Object)
.
Example:
Cast necessary because assumeThat(List)
"forgets" actual type:
assumeThat(new LinkedList<>(asList("abc"))).matches(list -> ((Deque<String>) list).getFirst().equals("abc"));
No cast needed, but also no additional list assertions:
assumeThatObject(new LinkedList<>(asList("abc"))).matches(list -> list.getFirst().equals("abc"));
T
- the type of the actual value.actual
- the actual value.default <T> ProxyablePredicateAssert<T> assumeThat(Predicate<T> predicate)
PredicateAssert
assumption.T
- the Predicate
type.predicate
- the Predicate to testdefault IntPredicateAssert assumeThat(IntPredicate intPredicate)
IntPredicateAssert
assumption.intPredicate
- the IntPredicate to testdefault LongPredicateAssert assumeThat(LongPredicate longPredicate)
LongPredicateAssert
assumption.longPredicate
- the LongPredicate to testdefault DoublePredicateAssert assumeThat(DoublePredicate doublePredicate)
DoublePredicateAssert
assumption.doublePredicate
- the DoublePredicate to testdefault AbstractUrlAssert<?> assumeThat(URL url)
UrlAssert
assumption.url
- the actual value.default AbstractUriAssert<?> assumeThat(URI uri)
UriAssert
assumption.uri
- the actual value.Copyright © 2014–2019 AssertJ. All rights reserved.