public interface WithAssertions
default Offset<Float> offset(Float value)
Assertions.offset(Float)default Offset<Double> offset(Double value)
Assertions.offset(Double)default <K,V> MapEntry<K,V> entry(K key, V value)
Assertions.entry(Object, Object)default void fail(String failureMessage)
Assertions.fail(String)default void fail(String failureMessage, Throwable realCause)
Assertions.fail(String,Throwable)default <T> Not<T> not(Condition<? super T> condition)
Assertions.not(Condition)default <T> Condition<T> allOf(Iterable<? extends Condition<? super T>> conditions)
Assertions.allOf(Iterable)default <T> Condition<T> allOf(Condition<? super T>... conditions)
Assertions.allOf(Condition[])default <T> AbstractObjectArrayAssert<?,T> assertThat(T[] actual)
org.assertj.core.api.Assertions#assertThat(T[])default <T extends AssertDelegateTarget> T assertThat(T assertion)
Assertions.assertThat(AssertDelegateTarget)default <K,V> MapAssert<K,V> assertThat(Map<K,V> actual)
Assertions.assertThat(Map)default AbstractShortAssert<?> assertThat(short actual)
Assertions.assertThat(short)default AbstractLongAssert<?> assertThat(long actual)
Assertions.assertThat(long)default AbstractLongAssert<?> assertThat(Long actual)
Assertions.assertThat(Long)default AbstractLongArrayAssert<?> assertThat(long[] actual)
Assertions.assertThat(long[])default <T> AbstractObjectAssert<?,T> assertThat(T actual)
org.assertj.core.api.Assertions#assertThat(T)default AbstractCharSequenceAssert<?,String> assertThat(String actual)
Assertions.assertThat(String)default AbstractDateAssert<?> assertThat(Date actual)
Assertions.assertThat(Date)default AbstractThrowableAssert<?,? extends Throwable> assertThat(Throwable actual)
Assertions.assertThat(Throwable)default AbstractBigDecimalAssert<?> assertThat(BigDecimal actual)
Assertions.assertThat(BigDecimal)default AbstractCharSequenceAssert<?,? extends CharSequence> assertThat(CharSequence actual)
Assertions.assertThat(CharSequence)default AbstractShortArrayAssert<?> assertThat(short[] actual)
Assertions.assertThat(short[])default AbstractShortAssert<?> assertThat(Short actual)
Assertions.assertThat(Short)default AbstractClassAssert<?> assertThat(Class<?> actual)
Assertions.assertThat(Class)default AbstractCharacterAssert<?> assertThat(Character actual)
Assertions.assertThat(Character)default AbstractCharArrayAssert<?> assertThat(char[] actual)
Assertions.assertThat(char[])default AbstractCharacterAssert<?> assertThat(char actual)
Assertions.assertThat(char)default <T extends Comparable<? super T>> AbstractComparableAssert<?,T> assertThat(T actual)
Assertions.assertThat(Comparable)default <T> IterableAssert<T> assertThat(Iterable<? extends T> actual)
Assertions.assertThat(Iterable)default <ACTUAL extends Iterable<? extends ELEMENT>,ELEMENT,ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT,ELEMENT>> FactoryBasedNavigableIterableAssert<?,ACTUAL,ELEMENT,ELEMENT_ASSERT> assertThat(Iterable<? extends ELEMENT> actual, AssertFactory<ELEMENT,ELEMENT_ASSERT> assertFactory)
Assertions.assertThat(Iterable, AssertFactory)default <T> IterableAssert<T> assertThat(Iterator<? extends T> actual)
Assertions.assertThat(Iterator)default <ACTUAL extends Iterable<? extends ELEMENT>,ELEMENT,ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT,ELEMENT>> ClassBasedNavigableIterableAssert<?,ACTUAL,ELEMENT,ELEMENT_ASSERT> assertThat(ACTUAL actual, Class<ELEMENT_ASSERT> assertClass)
Assertions.assertThat(Iterable, Class)default AbstractBooleanAssert<?> assertThat(Boolean actual)
Assertions.assertThat(Boolean)default AbstractBooleanArrayAssert<?> assertThat(boolean[] actual)
Assertions.assertThat(boolean)default AbstractByteAssert<?> assertThat(byte actual)
Assertions.assertThat(byte)default AbstractByteAssert<?> assertThat(Byte actual)
Assertions.assertThat(Byte)default AbstractByteArrayAssert<?> assertThat(byte[] actual)
Assertions.assertThat(byte[])default AbstractBooleanAssert<?> assertThat(boolean actual)
Assertions.assertThat(boolean)default AbstractFloatAssert<?> assertThat(float actual)
Assertions.assertThat(float)default AbstractInputStreamAssert<?,? extends InputStream> assertThat(InputStream actual)
Assertions.assertThat(InputStream)default AbstractFileAssert<?> assertThat(File actual)
Assertions.assertThat(File)default AbstractPathAssert<?> assertThat(Path actual)
Assertions.assertThat(Path)default AbstractIntArrayAssert<?> assertThat(int[] actual)
Assertions.assertThat(int[])default AbstractFloatAssert<?> assertThat(Float actual)
Assertions.assertThat(Float)default AbstractIntegerAssert<?> assertThat(int actual)
Assertions.assertThat(int)default AbstractFloatArrayAssert<?> assertThat(float[] actual)
Assertions.assertThat(float[])default AbstractIntegerAssert<?> assertThat(Integer actual)
Assertions.assertThat(Integer)default AbstractDoubleAssert<?> assertThat(double actual)
Assertions.assertThat(double)default AbstractDoubleAssert<?> assertThat(Double actual)
Assertions.assertThat(Double)default <T> ListAssert<? extends T> assertThat(List<? extends T> actual)
Assertions.assertThat(List)default <ELEMENT,ACTUAL extends List<? extends ELEMENT>,ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT,ELEMENT>> ClassBasedNavigableListAssert<?,ACTUAL,ELEMENT,ELEMENT_ASSERT> assertThat(List<? extends ELEMENT> actual, Class<ELEMENT_ASSERT> assertClass)
Assertions.assertThat(List, Class) )}default <ACTUAL extends List<? extends ELEMENT>,ELEMENT,ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT,ELEMENT>> FactoryBasedNavigableListAssert<?,ACTUAL,ELEMENT,ELEMENT_ASSERT> assertThat(List<? extends ELEMENT> actual, AssertFactory<ELEMENT,ELEMENT_ASSERT> assertFactory)
Assertions.assertThat(List, AssertFactory) )}default <T> AbstractListAssert<?,? extends List<? extends T>,T,ObjectAssert<T>> assertThat(Stream<? extends T> actual)
Assertions.assertThat(List)default AbstractDoubleArrayAssert<?> assertThat(double[] actual)
Assertions.assertThat(double[])default Properties<Object> extractProperty(String propertyName)
Assertions.extractProperty(String)default <T> Properties<T> extractProperty(String propertyName, Class<T> propertyType)
Assertions.extractProperty(String,Class)default Tuple tuple(Object... values)
Assertions.tuple(Object[])default Index atIndex(int actual)
Assertions.atIndex(int)default Offset<Double> within(Double actual)
Assertions.within(Double)default Offset<BigDecimal> within(BigDecimal actual)
Assertions.within(BigDecimal)default Offset<Float> within(Float actual)
Assertions.within(Float)default <T> Condition<T> anyOf(Iterable<? extends Condition<? super T>> conditions)
Assertions.anyOf(Iterable)default <T> Condition<T> anyOf(Condition<? super T>... conditions)
Assertions.anyOf(Condition[])default <T> DoesNotHave<T> doesNotHave(Condition<? super T> condition)
Assertions.doesNotHave(Condition)default String contentOf(File file, String charsetName)
Assertions.contentOf(File,String)default String contentOf(File actual)
Assertions.contentOf(File)default String contentOf(File file, Charset charset)
Assertions.contentOf(File,Charset)default List<String> linesOf(File actual)
Assertions.linesOf(File)default List<String> linesOf(File file, String charsetName)
Assertions.linesOf(File,String)default List<String> linesOf(File actual, Charset arg1)
Assertions.linesOf(File,Charset)default void setRemoveAssertJRelatedElementsFromStackTrace(boolean actual)
Assertions.setRemoveAssertJRelatedElementsFromStackTrace(boolean)default void failBecauseExceptionWasNotThrown(Class<? extends Throwable> exceptionClass)
default void setAllowExtractingPrivateFields(boolean actual)
Assertions.setAllowExtractingPrivateFields(boolean)default void registerCustomDateFormat(DateFormat actual)
Assertions.registerCustomDateFormat(DateFormat)default void registerCustomDateFormat(String actual)
Assertions.registerCustomDateFormat(String)default void useDefaultDateFormatsOnly()
Assertions.useDefaultDateFormatsOnly()default AbstractZonedDateTimeAssert<?> assertThat(ZonedDateTime actual)
Assertions.assertThat(ZonedDateTime)default <T> CompletableFutureAssert<T> assertThat(CompletableFuture<T> future)
Assertions.assertThat(CompletableFuture)default <T> OptionalAssert<T> assertThat(Optional<T> optional)
Assertions.assertThat(Optional)default OptionalDoubleAssert assertThat(OptionalDouble optional)
Assertions.assertThat(java.util.OptionalDouble)default OptionalIntAssert assertThat(OptionalInt optional)
Assertions.assertThat(java.util.OptionalInt)default OptionalLongAssert assertThat(OptionalLong optional)
Assertions.assertThat(java.util.OptionalLong)default AbstractLocalDateTimeAssert<?> assertThat(LocalDateTime localDateTime)
Assertions.assertThat(LocalDateTime)default AbstractLocalDateAssert<?> assertThat(LocalDate localDate)
Assertions.assertThat(LocalDate)default AbstractLocalTimeAssert<?> assertThat(LocalTime localTime)
Assertions.assertThat(LocalTime)default AbstractOffsetTimeAssert<?> assertThat(OffsetTime offsetTime)
Assertions.assertThat(OffsetTime)default AbstractOffsetDateTimeAssert<?> assertThat(OffsetDateTime offsetDateTime)
Assertions.assertThat(OffsetDateTime)default AbstractThrowableAssert<?,? extends Throwable> assertThatThrownBy(ThrowableAssert.ThrowingCallable shouldRaiseThrowable)
org.assertj.core.api.Assertions#assertThatThrownBy(ThrowingCallable)default Throwable catchThrowable(ThrowableAssert.ThrowingCallable shouldRaiseThrowable)
org.assertj.core.api.Assertions#catchThrowable(ThrowingCallable)default <T extends Throwable> ThrowableTypeAssert<T> assertThatExceptionOfType(Class<? extends T> exceptionType)
throwingCallable
which allows to chain assertions on the thrown exception.
Example:
assertThatExceptionOfType(IOException.class).isThrownBy(() -> { throw new IOException("boom!"); })
.withMessage("boom!");
This method is more or less the same of #assertThatThrownBy(ThrowingCallable) but in a more natural way.actual - the actual value.ThrowableTypeAssert.default <T> PredicateAssert<T> assertThat(Predicate<T> actual)
Assertions.assertThat(Predicate)default IntPredicateAssert assertThat(IntPredicate actual)
Assertions.assertThat(IntPredicate)default LongPredicateAssert assertThat(LongPredicate actual)
Assertions.assertThat(LongPredicate)default DoublePredicateAssert assertThat(DoublePredicate actual)
Assertions.assertThat(DoublePredicate)default AbstractUrlAssert<?> assertThat(URL actual)
Assertions.assertThat(URL)default AbstractUriAssert<?> assertThat(URI actual)
Assertions.assertThat(URI)default <T> T assertThat(AssertProvider<T> component)
Assertions.assertThat(AssertProvider)default <E> Filters<E> filter(E[] array)
org.assertj.core.api.Assertions#filter(E[])default <E> Filters<E> filter(Iterable<E> iterableToFilter)
Assertions.filter(Iterable)Copyright © 2014–2017 AssertJ. All rights reserved.