| Modifier and Type | Field and Description |
|---|---|
| protected final ACTUAL | |
| pack-priv AssertionErrorCreator | |
| pack-priv Conditions | |
| pack-priv static Representation | |
| private static Consumer | |
| public WritableAssertionInfo | |
| protected final SELF | |
| protected Objects | |
| private static final String | |
| pack-priv static boolean | |
| public static boolean |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | Returns: true if actual and other are equal according to the underlying comparison strategy.the object to compare to other actual, Object the object to compare to actual other)
Deprecated
Returns true if actual and other are equal according to the current comparison strategy.
ComparisonStrategy will become part of the public API in the next major release and this method
will be removed.
|
| public <ASSERT extends AbstractAssert | asInstanceOf(InstanceOfAssertFactory<?, ASSERT>
the factory which verifies the type and creates the new instanceOfAssertFactory)Assert.Implements org. InstanceOfAssertFactory to verify that the actual value is an instance of a given type and to produce
a new Assert narrowed to that type.
|
| public AbstractListAssert | asList()
Implements org.
Deprecated
use
Verifies that the actual value is an instance of List,
and returns a list assertion, to allow chaining of list-specific
assertions from this call.
asInstanceOf(InstanceOfAssertFactories. instead
|
| protected AssertionError | |
| public AbstractStringAssert | asString()
Implements org. toString() of the actual
value, to allow chaining of String-specific assertions from this call.
|
| private AssertionError | |
| private Optional | |
| public SELF | describedAs(Description
the new description to set. description)Implements org. |
| public String | Returns: the description String representation of this assertion.The description of this assertion set with |
| public SELF | doesNotHave(Condition<? super ACTUAL>
the given condition. condition)Implements org. |
| public SELF | doesNotHaveSameClassAs(Object
the object to check type against. other)Implements org. |
| public SELF | doesNotHaveSameHashCodeAs(Object
the object to check hashCode against. other)Implements org. |
| public SELF | doesNotHaveToString(String
the String to check against. otherToString)Implements org. actual.toString() is not equal to the given String.
|
| public SELF | doesNotHaveToString(String
the format string to use. expectedStringTemplate, Object... the arguments to interpolate into the format string. args)Implements org. actual.toString() is not equal to the given String.
|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Implements org.
Deprecated
use
Indicates whether some other object is "equal to" this one.
isEqualTo instead
|
| protected < the type of the resulting ASSERT extends AbstractAssertAssert | Returns: the newAssert instancethe property/field to extract from the initial object under test propertyOrField, AssertFactory<Object, ASSERT> the factory for the creation of the new assertFactory)AssertExtracts the value of given field/property from the object under test and creates a new assertion object using the given assert factory. |
| protected < the expected extracted value type T, the type of the resulting ASSERT extends AbstractAssertAssert | Returns: the newAssert instancethe extractor function used to extract the value from the object under test extractor, AssertFactory<T, ASSERT> the factory for the creation of the new assertFactory)AssertUses the given |
| protected AssertionError | |
| protected AssertionError | Returns: The generated assertion error.the actual object that was found during the test actual, Object the object that was expected expected, String the error message to format errorMessageFormat, Object... the arguments referenced by the format specifiers in the errorMessage string. arguments)Generate a custom assertion error using the information in this assertion, using the given actual and expected values. |
| protected void | failWithActualExpectedAndMessage(Object
the actual object that was found during the test actual, Object the object that was expected expected, String the error message to format errorMessageFormat, Object... the arguments referenced by the format specifiers in the errorMessage string. arguments)Throw an assertion error based on information in this assertion. |
| protected void | failWithMessage(String
the error message to format errorMessage, Object... the arguments referenced by the format specifiers in the errorMessage string. arguments)Throw an assertion error based on information in this assertion. |
| public WritableAssertionInfo | Returns: theWritableAssertionInfo used in the current assertionExposes the |
| public SELF | has(Condition<? super ACTUAL>
the given condition. condition)Implements org. |
| public int | |
| public SELF | hasSameClassAs(Object
the object to check type against. other)Implements org. |
| public SELF | hasSameHashCodeAs(Object
the object to check hashCode against. other)Implements org. |
| public SELF | hasToString(String
the expected String description of actual. expectedToString)Implements org. actual.toString() is equal to the given String.
|
| public SELF | hasToString(String
the format string to use. expectedStringTemplate, Object... the arguments to interpolate into the format string. args)Implements org. actual.toString() is equal to the given String when
formatted with the given arguments.
|
| protected SELF | Returns: this assertion object.Use binary object representation instead of standard representation in error messages. |
| protected SELF | Returns: this assertion object.Use hexadecimal object representation instead of standard representation in error messages. |
| public SELF | is(Condition<? super ACTUAL>
the given condition. condition)Implements org. |
| private boolean | |
| protected boolean | |
| public SELF | isEqualTo(Object
the given value to compare the actual value to. expected)Implements org. |
| public SELF | isExactlyInstanceOf(Class<?>
the type to check the actual value against. type)Implements org. |
| public SELF | isIn(Object...
the given array to search the actual value in. values)Implements org. |
| public SELF | isIn(Iterable<?>
the given iterable to search the actual value in. values)Implements org. |
| public SELF | isInstanceOf(Class<?>
the type to check the actual value against. type)Implements org. |
| public SELF | isInstanceOfAny(Class<?>...
the types to check the actual value against. types)Implements org. |
| public <T> SELF | isInstanceOfSatisfying(Class<T>
the type to check the actual value against. type, Consumer<T> the requirements expressed as a requirements)Consumer.Implements org. Consumer.
|
| public SELF | isNot(Condition<? super ACTUAL>
the given condition. condition)Implements org. |
| public SELF | isNotEqualTo(Object
the given value to compare the actual value to. other)Implements org. |
| public SELF | isNotExactlyInstanceOf(Class<?>
the type to check the actual value against. type)Implements org. |
| public SELF | isNotIn(Object...
the given array to search the actual value in. values)Implements org. |
| public SELF | isNotIn(Iterable<?>
the given iterable to search the actual value in. values)Implements org. |
| public SELF | isNotInstanceOf(Class<?>
the type to check the actual value against. type)Implements org. |
| public SELF | isNotInstanceOfAny(Class<?>...
the types to check the actual value against. types)Implements org. |
| public SELF | isNotNull()
Implements org. null.
|
| public SELF | isNotOfAnyClassIn(Class<?>...
the types to check the actual value against. types)Implements org. |
| public SELF | isNotSameAs(Object
the given value to compare the actual value to. other)Implements org. |
| public void | |
| public SELF | isOfAnyClassIn(Class<?>...
the types to check the actual value against. types)Implements org. |
| public SELF | isSameAs(Object
the given value to compare the actual value to. expected)Implements org. |
| public SELF | |
| public SELF | Returns: this assertion object.the predicate, String Predicate to matcha description of the predicateDescription)Predicate used in the error messageVerifies that the actual object matches the given predicate, the predicate description is used to get an informative error message. |
| private SELF | |
| private AssertionError | |
| protected < the type of elements. E> AbstractListAssert | Returns: a newAbstractListAssert.new list under test newActual)Create a |
| public SELF | Returns: this assertion object.the error message that will replace the default one provided by Assertj. newErrorMessage, Object... the args used to fill error message as in args)String#format(String, Object..Overrides AssertJ default error message by the given one. |
| public SELF | Returns: this assertion object.the supplier supplies error message that will replace the default one provided by Assertj. supplier)Overrides AssertJ default error message by the given one. |
| private void | |
| private void | |
| private void | |
| public SELF | satisfies(Condition<? super ACTUAL>
the given condition. condition)Implements org. |
| public final SELF | |
| public final SELF | Returns: this assertion object.the group of assertions to run against the object under test - must not be null. assertions)Verifies that the actual object satisfied the given requirements expressed as |
| public final SELF | Returns: this assertion object.the group of assertions to run against the object under test - must not be null. assertions)Verifies that the actual object under test satisfies at least one of the given assertions group expressed as |
| public final SELF | Returns: this assertion object.the group of assertions to run against the object under test - must not be null. assertions)Verifies that the actual object under test satisfies at least one of the given assertions group expressed as |
| protected SELF | |
| private boolean | |
| protected SELF | |
| public static void | |
| public static void | |
| public static void | |
| protected void | throwAssertionError(ErrorMessageFactory
used to define the error message. errorMessageFactory)Utility method to throw an |
| public SELF | usingComparator(Comparator<? super ACTUAL>
the comparator to use for the incoming assertion checks. customComparator)Implements org. |
| public SELF | usingComparator(Comparator<? super ACTUAL>
the comparator to use for the incoming assertion checks. customComparator, String comparator description to be used in assertion error messages customComparatorDescription)Implements org. |
| public SELF | usingDefaultComparator()
Implements org. |
| protected RecursiveAssertionAssert | |
| protected RecursiveAssertionAssert | |
| protected RecursiveComparisonAssert | |
| protected RecursiveComparisonAssert | |
| pack-priv SELF | withAssertionState(AbstractAssert<SELF extends AbstractAssert<SELF, ACTUAL>, ACTUAL> assertInstance)
|
| public SELF | Returns: this assertion object.the error message that will replace the default one provided by Assertj. newErrorMessage, Object... the args used to fill error message as in args)String#format(String, Object..Alternative method for You must set it before calling the assertion otherwise it is ignored as the failing assertion breaks the chained call by throwing an AssertionError. |
| public SELF | Returns: this assertion object.the supplier supplies error message that will replace the default one provided by Assertj. supplier)Alternative method for The new error message is only built if the assertion fails (by consuming the given supplier), this is useful if building messages is expensive. |
| public SELF | withRepresentation(Representation
Describe/represent values in AssertJ error messages. representation)Implements org. Representation to describe/represent values in AssertJ error messages.
|
| public SELF | withThreadDumpOnError()
Implements org. System#err.
|