The difference with the Assertions class is that entry point methods are named then instead of
assertThat.
For example:
@Test
public void bdd_assertions_example() {
//given
List<BasketBallPlayer> bulls = new ArrayList<>();
//when
bulls.add(rose);
bulls.add(noah);
then(bulls).contains(rose, noah).doesNotContain(james);
}
Use and to avoid clash with other libraries (like BDDMockito) exposing 'then(object)'.
You might have to ignore a warning like: The static method BDDAssertions.then() should be accessed in a static way.
| Modifier and Type | Field and Description |
|---|---|
| public static final BDDAssertions | and
A |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static < the type of object the given condition accept. T> Condition | Returns: the createdAllOf.the conditions to evaluate. conditions)Hides org.
|
| public static < the type of object the given condition accept. T> Condition | Returns: the createdAllOf.the conditions to evaluate. conditions)Hides org.
|
| public static < the type of object the given consumers accept T> ThrowingConsumer | Returns: theThrowingConsumer instancethe consumers to evaluate consumers)Hides org. that delegates the evaluation of the
given consumers to AbstractAssert#satisfies(ThrowingConsumer[]).
|
| public static < the type of object the given condition accept. T> Condition | Returns: the createdAnyOf.the conditions to evaluate. conditions)Hides org. AnyOf#anyOf(Condition. so that Assertions offers a full feature entry point to all
AssertJ features (but you can use AnyOf if you prefer).
|
| public static < the type of object the given condition accept. T> Condition | Returns: the createdAnyOf.the conditions to evaluate. conditions)Hides org.
|
| public static < the type of object the given consumers accept T> ThrowingConsumer | Returns: theThrowingConsumer instancethe consumers to evaluate consumers)Hides org. that delegates the evaluation of the
given consumers to AbstractAssert#satisfiesAnyOf(ThrowingConsumer[]).
|
| public static < the type to use for the cast. T, the type of the resulting ASSERT extends AbstractAssertAssert | Returns: same instance ofassertFactorythe factory which verifies the type and creates the new assertFactory)AssertHides org. InstanceOfAssertFactory parameter.
|
| public static Index | Returns: the createdIndex.the value of the index. index)Hides org. Index#atIndex(int) so that Assertions offers a full feature entry point to all AssertJ
features (but you can use Index if you prefer).
|
| public static Offset | Returns: the createdOffset.the value of the offset. value)Hides org. <b>strict</b> Offset to use with AbstractDoubleAssert#isCloseTo(double, Offset) and AbstractDoubleAssert#isNotCloseTo(double, Offset) assertions.
|
| public static Offset | Returns: the createdOffset.the value of the offset. value)Hides org. offset(Float) to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the value of the offset. value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the value of the offset. value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the value of the offset. value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the value of the offset. value)Hides org. Offset to use with strict isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the value of the offset. value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the value of the offset. value)Hides org. Offset to use with strict isCloseTo assertions.
|
| public static TemporalUnitOffset | Returns: the createdOffset.the value of the offset. value, TemporalUnit the unit)TemporalUnit of the offset.Hides org. TemporalUnitOffset with strict less than condition
to use with isCloseTo temporal assertions.
|
| public static Exception | Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. throwingCallableHides org. Exception.
|
| public static IllegalArgumentException | Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. throwingCallableHides org. IllegalArgumentException.
|
| public static IllegalStateException | Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. throwingCallableHides org. IllegalStateException.
|
| public static IndexOutOfBoundsException | Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. throwingCallableHides org. IndexOutOfBoundsException.
|
| public static IOException | Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. throwingCallableHides org. IOException.
|
| public static NullPointerException | Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. throwingCallableHides org. NullPointerException.
|
| public static ReflectiveOperationException | Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. throwingCallableHides org. ReflectiveOperationException.
|
| public static RuntimeException | Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. throwingCallableHides org. RuntimeException.
|
| public static Throwable | Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. throwingCallableHides org. Throwable more easily when used with Java 8 lambdas.
|
| public static < the THROWABLE extends Throwable> THROWABLEThrowable type. | Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. throwingCallable,The type of exception that the code is expected to raise. type)Hides org.
Deprecated
use
Allows catching a catchThrowableOfType(Class, ThrowingCallable) instead.
Throwable of a specific type.
|
| public static < the THROWABLE extends Throwable> THROWABLEThrowable type. | Returns: The captured exception ornull if none was raised by the callable.The type of exception that the code is expected to raise. type, ThrowableAssert.The lambda with the code that should raise the exception. throwingCallableHides org. Throwable of a specific type.
|
| public static String | Returns: the content of the file.the file. file, Charset the character set to use. charset)Hides org. assertThat(String).
|
| public static String | Returns: the content of the file.the file. file, String the name of the character set to use. charsetName)Hides org. assertThat(String).
|
| public static String | Returns: the content of the file.the file. file)Hides org. assertThat(String).
|
| public static String | Returns: the content of the URL.the URL. url, Charset the character set to use. charset)Hides org. assertThat(String).
|
| public static String | Returns: the content of the URL.the URL. url, String the name of the character set to use. charsetName)Hides org. assertThat(String).
|
| public static String | Returns: the content of the file.the URL. url)Hides org. assertThat(String).
|
| public static < the type of object the given condition accept. T> DoesNotHave | Returns: The DoesNotHave condition created.the condition to inverse. condition)Hides org. .
|
| public static < the type of keys in the map. K, the type of values in the map. V> MapEntry | Returns: the createdMapEntry.the key of the entry to create. key, V the value of the entry to create. value)Hides org. MapEntry#entry(Object, Object) so that Assertions offers a full feature entry point to
all
AssertJ features (but you can use MapEntry if you prefer).
|
| public static < the type of value to extract. T> Properties | Returns: the createdProperties.the name of the property to be read from the elements of a propertyName, Class<T> Iterable. It may be a nested
property (e.g. "address.street.number").the type of property to extract propertyType)Hides org. Properties#extractProperty(String) so that Assertions offers a full feature entry point
to
all AssertJ features (but you can use Properties if you prefer).
|
| public static Properties | Returns: the createdProperties.the name of the property to be read from the elements of a propertyName)Iterable. It may be a nested
property (e.g. "address.street.number").Hides org. Properties#extractProperty(String) so that Assertions offers a full feature entry point
to
all AssertJ features (but you can use Properties if you prefer).
|
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> fail("boom")));.error message. failureMessage)Hides org. AssertionError with the given message.
|
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> fail()));.Hides org. AssertionError with an empty message to be used in code like:
|
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> fail("b%s", ""oom)));.error message. failureMessage, Object... Arguments referenced by the format specifiers in the format string. args)Hides org. AssertionError with the given message built as String#format(String, Object..
|
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> fail("boom", cause)));.the description of the failed assertion. It can be failureMessage, Throwable null.cause of the error. realCause)Hides org. AssertionError with the given message and with the Throwable that caused the failure.
|
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> fail(cause)));.cause of the error. realCause)Hides org. AssertionError with the Throwable that caused the failure.
|
| public static < Type of test subject F, Type of the property under the assertion T> Function | Returns: same instance ofextractorA function to extract test subject's property extractor)Hides org. ObjectAssert#returns(Object, Function) and
ObjectAssert#doesNotReturn(Object, Function).
|
| public static InFilter | Returns: the created "in" filtervalues to match (one match is sufficient) values)Hides org. FilterOperator to use in filteredOn(String, FilterOperation) to express a filter keeping all Iterable elements whose property/field
value matches one of the given values.
|
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static List | |
| public static < the type of object the given condition accept. T> Not | Returns: The Not condition created.the condition to inverse. condition)Hides org. .
|
| public static NotFilter | Returns: the created "not" filterthe value not to match valueNotToMatch)Hides org. FilterOperator to use in filteredOn(String, FilterOperation) to express a filter keeping all Iterable elements whose property/field
value matches does not match the given value.
|
| public static NotInFilter | Returns: the created "not in" filtervalues not to match (none of the values must match) valuesNotToMatch)Hides org. FilterOperator to use in filteredOn(String, FilterOperation) to express a filter keeping all Iterable elements whose property/field
value matches does not match any of the given values.
|
| public static void | registerCustomDateFormat(DateFormat
the new Date format used for String based Date assertions. userCustomDateFormat)Hides org. org..
|
| public static void | registerCustomDateFormat(String
the new Date format pattern used for String based Date assertions. userCustomDateFormatPattern)Hides org. org..
|
| public static < the type of format. T> void | registerFormatterForType(Class<T>
the class of the type to format type, Function<T, String> the formatter formatter)FunctionHides org. Representation to format the different types involved, using this method
you can control the formatting of a given type by providing a specific formatter.
|
| public static void | setAllowComparingPrivateFields(boolean
allow private fields comparison. Default is true. allowComparingPrivateFields)Hides org. |
| public static void | setAllowExtractingPrivateFields(boolean
allow private fields extraction. Default is true. allowExtractingPrivateFields)Hides org.
and
should be allowed to extract private fields, if not and they try it fails with exception.
|
| public static void | setDescriptionConsumer(Consumer<Description>
the descriptionConsumer)Description consumerHides org. Consumer<Description> allowing for example to record them in a file.
|
| public static void | setExtractBareNamePropertyMethods(boolean
whether bare-named property methods are found barenamePropertyMethods)Hides org. String name().
|
| public static void | setLenientDateParsing(boolean
whether lenient parsing mode should be enabled or not value)Hides org. |
| public static void | setMaxElementsForPrinting(int
the maximum elements that would be printed for iterables, arrays and maps. maxElementsForPrinting)Hides org. |
| public static void | setMaxLengthForSingleLineDescription(int
the maximum length for an iterable/array to be displayed on one line maxLengthForSingleLineDescription)Hides org. |
| public static void | setMaxStackTraceElementsDisplayed(int
the maximum number of lines for a stacktrace to be displayed on one throw. maxStackTraceElementsDisplayed)Hides org. Throwable representation (by default this set to 3).
|
| public static void | setPrintAssertionsDescription(boolean
whether to print assertions description. printAssertionsDescription)Hides org. |
| public static void | setRemoveAssertJRelatedElementsFromStackTrace(boolean
flag. removeAssertJRelatedElementsFromStackTrace)Hides org. |
| public static < dummy return value type T> T | Returns: nothing, it's just to be used indoSomething(optional.orElseGet(() -> shouldHaveThrown(IOException.class)));.the Throwable class that was expected to be thrown. throwableClass)Hides org. AssertionError with a message explaining that a Throwable of given class was expected to be thrown
but had not been.
|
| public static < the type of the value contained in the T> PredicateAssertPredicate. | |
| public static IntPredicateAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static LongPredicateAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static DoublePredicateAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static < the type of the value contained in the VALUE> OptionalAssertjava.. | Returns: the created assertion object.the actual value. optional)Create assertion for |
| public static OptionalIntAssert | Returns: the created assertion object.the actual value. optional)Create assertion for |
| public static OptionalLongAssert | Returns: the created assertion object.the actual value. optional)Create assertion for |
| public static MatcherAssert | Returns: the created assertion object.the actual matcher actual)Create assertion for |
| public static OptionalDoubleAssert | Returns: the created assertion object.the actual value. optional)Create assertion for |
| public static AbstractBigDecimalAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractBigIntegerAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractBooleanAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractBooleanAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractBooleanArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static Boolean2DArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractByteAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractByteAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractByteArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static Byte2DArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractCharacterAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractCharArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static Char2DArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractCharacterAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static ClassAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the actual type T extends Comparable | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the actual elements type T> IterableAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the actual elements type T> IteratorAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < The actual type ACTUAL extends IterableThe actual elements type ELEMENT, The actual elements AbstractAssert type ELEMENT_ASSERT extends AbstractAssert | Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)
Deprecated
This was added to help creating type-specific assertions for the elements of an
Creates a new instance of Iterable instance.
allowing to navigate to any Iterable element
in order to perform assertions on it.
|
| public static < The actual type ACTUAL extends IterableThe actual elements type ELEMENT, The actual elements AbstractAssert type ELEMENT_ASSERT extends AbstractAssert | Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)
Deprecated
This was added to help creating type-specific assertions for the elements of an
Creates a new instance of Iterable instance.
allowing to navigate to any Iterable element
in order to perform assertions on it.
|
| public static < The actual type ACTUAL extends ListThe actual elements type ELEMENT, The actual elements AbstractAssert type ELEMENT_ASSERT extends AbstractAssert | Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)
Deprecated
This was added to help creating type-specific assertions for the elements of an
Creates a new instance of List instance.
allowing to navigate to any List element
in order to perform assertions on it.
|
| public static < The actual elements type ELEMENT, The actual type ACTUAL extends ListThe actual elements AbstractAssert type ELEMENT_ASSERT extends AbstractAssert | Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)
Deprecated
This was added to help creating type-specific assertions for the elements of an
Creates a new instance of Iterable instance.
allowing to navigate to any List element
in order to perform assertions on it.
|
| public static AbstractDoubleAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractDoubleAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractDoubleArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static Double2DArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractFileAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractPathAssert | Returns: the created assertion objectthe path to test actual)Creates a new instance of |
| public static < the type of the value contained in the RESULT> FutureAssertjava.. | Returns: the created assertion objectthe future to test actual)Creates a new instance of |
| public static AbstractInputStreamAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractFloatAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractFloatAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractFloatArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static Float2DArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractIntegerAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractIntArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static Int2DArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractIntegerAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the type of elements. E> AbstractCollectionAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the type of elements. T> ListAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractLongAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractLongAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractLongArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static Long2DArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the type of the actual value. T> ObjectAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the actual's elements type. T> ObjectArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the actual's elements type. T> Object2DArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the type of keys in the map. K, the type of values in the map. V> MapAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractShortAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractShortAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractShortArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static Short2DArrayAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractCharSequenceAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractCharSequenceAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractCharSequenceAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractStringAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractDateAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AtomicBooleanAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static AtomicIntegerAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static AtomicIntegerArrayAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static < the type of the object holding the updatable field. OBJECT> AtomicIntegerFieldUpdaterAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static LongAdderAssert | |
| public static AtomicLongAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static AtomicLongArrayAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static < the type of the object holding the updatable field. OBJECT> AtomicLongFieldUpdaterAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static < the type of the value contained in the VALUE> AtomicReferenceAssertAtomicReference. | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static < the type of the value contained in the ELEMENT> AtomicReferenceArrayAssertAtomicReferenceArray. | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static < the type of the field which gets updated by the FIELD, AtomicReferenceFieldUpdater.the type of the object holding the updatable field. OBJECT> AtomicReferenceFieldUpdaterAssert | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static < the type of the value contained in the VALUE> AtomicMarkableReferenceAssertAtomicMarkableReference. | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static < the type of the value contained in the VALUE> AtomicStampedReferenceAssertAtomicStampedReference. | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static < the type of the actual throwable. T extends Throwable> AbstractThrowableAssert | Returns: the created assertion Throwable.the actual value. actual)Creates a new instance of |
| public static TemporalAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractLocalDateAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractYearMonthAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractLocalDateTimeAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractZonedDateTimeAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractLocalTimeAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractOffsetTimeAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractInstantAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractDurationAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractPeriodAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractUriAssert | |
| public static AbstractUrlAssert | |
| public static AbstractOffsetDateTimeAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the type of the value contained in the RESULT> CompletableFutureAssertjava.. | Returns: the created assertion object.the actual value. future)Create assertion for |
| public static < the type of the value contained in the RESULT> CompletableFutureAssertjava.. | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static < the generic type of the user-defined assert. T extends AssertDelegateTarget> T | |
| public static < the AssertProvider wrapped type. T> T | Returns: the associatedAssert of the given componentthe component that creates its own assert component)Delegates the creation of the |
| public static < the type of elements. ELEMENT> ListAssert | Returns: the created assertion object.the actual actual)Stream value.Creates a new instance of |
| public static ListAssert | Returns: the created assertion object.the actual actual)DoubleStream value.Creates a new instance of |
| public static ListAssert | Returns: the created assertion object.the actual actual)LongStream value.Creates a new instance of |
| public static ListAssert | Returns: the created assertion object.the actual actual)IntStream value.Creates a new instance of |
| public static < the type of elements. ELEMENT> SpliteratorAssert | Returns: the created assertion object.the spliterator to test. actual)Creates a new instance of |
| public static AbstractCharSequenceAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractThrowableAssert | Returns: The captured exception ornull if none was raised by the callable.The shouldRaiseOrNotThrowableThrowingCallable or lambda with the code that should raise the throwable.Allows to capture and then assert on a |
| public static < the type of elements. E> AbstractCollectionAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the type of actual. T> AbstractUniversalComparableAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static ThrowableTypeAssert | Returns: the createdThrowableTypeAssert.Alias for |
| public static < the exception type. T extends Throwable> ThrowableTypeAssert | Returns: the createdThrowableTypeAssert.the exception type class. exceptionType)Entry point to check that an exception of type T is thrown by a given |
| public static ThrowableTypeAssert | Returns: the createdThrowableTypeAssert.Alias for |
| public static ThrowableTypeAssert | Returns: the createdThrowableTypeAssert.Alias for |
| public static ThrowableTypeAssert | Returns: the createdThrowableTypeAssert.Alias for |
| public static ThrowableTypeAssert | Returns: the createdThrowableTypeAssert.Alias for |
| public static < the type of elements. ELEMENT> IterableAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the type of elements. ELEMENT> IteratorAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static < the type of elements. ELEMENT> ListAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static NotThrownAssert | Returns: the createdNotThrownAssert.Entry point to check that no exception of any type is thrown by a given |
| public static ThrowableTypeAssert | Returns: the createdThrowableTypeAssert.Alias for |
| public static < the type of the actual value. T> ObjectAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractPathAssert | Returns: the created assertion objectthe path to test actual)Creates a new instance of
Use this over |
| public static < the type of the value contained in the T> PredicateAssertPredicate. | Returns: the created assertion object.the actual value. actual)Create assertion for |
| public static ThrowableTypeAssert | Returns: the createdThrowableTypeAssert.Alias for |
| public static ThrowableTypeAssert | Returns: the createdThrowableTypeAssert.Alias for |
| public static < the type of elements. ELEMENT> ListAssert | Returns: the created assertion object.the actual value. actual)Creates a new instance of |
| public static AbstractThrowableAssert | Returns: the createdThrowableAssert.The shouldRaiseThrowableThrowingCallable or lambda with the code that should raise the throwable.Allows to capture and then assert on a |
| public static AbstractThrowableAssert | Returns: the createdThrowableAssert.The shouldRaiseThrowable,ThrowingCallable or lambda with the code that should raise the throwable.the new description to set. description, Object... optional parameter if description is a format String. args)Allows to capture and then assert on a |
| public static < the type of the actual value. T> ObjectAssert | |
| public static Tuple | Returns: the builtTuplethe values stored in the values)TupleHides org. Tuple when working with IterableAssert#extracting(String. or
ObjectArrayAssert#extracting(String.
|
| public static void | useDefaultDateFormatsOnly()
Hides org. |
| public static void | useDefaultRepresentation()
Hides org. StandardRepresentation to revert the effect of calling useRepresentation(Representation).
|
| public static void | useRepresentation(Representation
the customRepresentation)Representation to useHides org. Representation that will be used in all following assertions.
|
| public static Offset | Returns: the createdOffset.the allowed offset value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the allowed offset value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the allowed offset value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the allowed offset value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the value of the offset. value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the value of the offset. value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the allowed offset value)Hides org. Offset to use with isCloseTo assertions.
|
| public static Offset | Returns: the createdOffset.the allowed offset value)Hides org. Offset to use with isCloseTo assertions.
|
| public static TemporalUnitOffset | Returns: the createdOffset.the allowed offset value, TemporalUnit the unit)TemporalUnit of the offsetHides org. TemporalUnitOffset with less than or equal condition
to use with isCloseTo temporal assertions.
|
| public static Percentage | Returns: the createdPercentage.the required precision percentage value)Hides org. org. to use with isCloseTo assertions for
percentages.
|
| public static Percentage | Returns: the createdPercentage.the required precision percentage value)Hides org. org. to use with isCloseTo assertions for
percentages.
|
| public static Percentage | Returns: the createdPercentage.the required precision percentage value)Hides org. org. to use with isCloseTo assertions for
percentages.
|
| public static Duration | Returns: the given value.the allowed difference allowedDifference)Duration.Hides org. AbstractDurationAssert#isCloseTo(Duration, Duration) assertion.
|
| public static Offset | Returns: the createdOffset.the required precision value)Hides org. Offset to use with real number assertions.
|
| public static Offset | Returns: the createdOffset.the required precision value)Hides org. Offset to use with real number assertions.
|