No API in this release is deprecated for removal.
| Since | Deprecated Item and Description |
|---|---|
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)
| |
org.
the reference object with which to compare. obj)use | |
org.
Custom element Comparator is not supported for Boolean array comparison. | |
org.
the comparator to use for incoming assertion checks. customComparator)Custom element Comparator is not supported for Boolean array comparison. | |
org.
the comparator to use for the incoming assertion checks. customComparator)Custom Comparator is not supported for Boolean comparison. | |
org.
the comparator to use for the incoming assertion checks. customComparator, String comparator description to be used in assertion error messages customComparatorDescription)Custom Comparator is not supported for Boolean comparison. | |
Returns: a newStringAssert instance whose string under test is the result of the encoding.use Encodes the actual array into a Base64 string, the encoded string becoming the new object under test. Examples:
| |
Returns: this assertion object.Use | |
Returns: this assertion object.Use | |
Returns: this assertion object to chain other assertions.the XML expectedXml)CharSequence to which the actual CharSequence is to be compared to.This assertion has some limitations, for example it does not handle tab vs space and would fail if elements are the same but
in a different order. Original javadoc:
Verifies that the actual Example:
| |
Returns: this assertion object to chain other assertions.the file to read the expected XML String to compare with actual xmlFile)CharSequence
| |
org.
Custom element Comparator is not supported for CharSequence comparison. | |
org.
the comparator to use for incoming assertion checks. customComparator)Custom element Comparator is not supported for CharSequence comparison. | |
Returns: this assertions objectthe fields who must be in the class. fields)use | |
Returns: this assertion object.Combine isCompletedExceptionally with isNotCancelled instead:
This assertion is deprecated to change the semantics of failed to correspond to CompletableFuture#get() failing.
Original javadoc
Verifies that the
Assertion will pass :
Assertion will fail :
| |
Returns: an exception assertion object.
Although not 100% the same, consider using
This assertion is deprecated because it relies on hasFailed() semantics which we want to move away from (they
are not clear!) and to use failure semantics corresponding to CompletableFuture#get() failing.
Original javadoc
Verifies that the Assertion will pass :
Assertion will fail :
| |
Returns: this assertion object.Use matches with the following combination instead:
This assertion is deprecated because its semantic is not obvious.
Original javadoc
Verifies that the Assertion will pass :
Assertion will fail :
| |
Returns: this assertion object.the given Date. other)prefer calling | |
Returns: this assertion object.the given Date represented as String in default or custom date format. dateAsString)prefer calling | |
Returns: this assertion object.the given Date. other)prefer calling | |
Returns: this assertion object.the given Date represented as String in default or custom date format. dateAsString)prefer calling | |
Returns: this assertion object.the given Date represented as String in default or custom date format. dateAsString)Use | |
Returns: this assertion object.the given instant)Instant.Use | |
Returns: this assertion object.the given Date. date)Use | |
Returns: this assertion object.the given Date represented as String in default or custom date format. dateAsString)Use | |
Returns: this assertion object.the given instant)Instant.Use | |
Returns: this assertion object.the given Date represented as String in default or custom date format. date)Use | |
Returns: this assertion object.the given Date represented as String in default or custom date format. dateAsString)Use | |
Returns: this assertion object.the given instant)Instant.Use | |
Returns: this assertion object.the given Date. date)Use | |
Returns: this assertion object.the given Date represented as String in default or custom date format. dateAsString)Use | |
Returns: this assertion object.the given instant)Instant.Use | |
Returns: this assertion object.the given Date represented as String in default or custom date format. date)Use | |
Returns: this assertion object.the given other)Date to compare actual Date to.Use | |
Returns: this assertion object.the given Date represented as String in default or custom date format. dateAsString)Use | |
Returns: this assertion object.the given other)Date to compare actual Date to.Use | |
Returns: this assertion object.the given Date represented as String in default or custom date format. dateAsString)Use | |
Returns: this assertion object.the given other)Date to compare actual Date to.Use | |
Returns: this assertion object.the given Date represented as String. dateAsString)Use | |
Returns: this assertion object.the day of month to compare actual day of month to dayOfMonth)use | |
Returns: this assertion object.the day of week to compare actual day of week to, see dayOfWeek)Calendar#DAY_OF_WEEK for valid
valuesuse | |
Returns: this assertion object.the hour of day to compare actual hour of day to (24-hour clock) hourOfDay)use | |
Returns: this assertion object.the millisecond to compare actual millisecond to millisecond)use | |
Returns: this assertion object.the minute to compare actual minute to minute)use | |
Returns: this assertion object.the month to compare actual month to, month value starting at 1 (January=1, February=2, ...). month)use | |
Returns: this assertion object.the second to compare actual second to second)use | |
Returns: this assertion object.the year to compare actual year to year)use | |
Returns: this assertion object.the given expected)File to compare the actual File to.use | |
Returns: this assertion object.the given expected)File to compare the actual File to.use
Verifies that the content of the actual
| |
Returns: this assertion object.the given expected, Charset File to compare the actual File to.the expectedCharset)Charset used to read the content of the expected file.use | |
Returns: this assertion object.the given expected)InputStream to compare the actual InputStream to.use | |
org.
the given iterable)Iterable we will get elements from.
| |
org.
the assertions to perform on the unique element. elementAssertions)use | |
Returns: this assertions objectthe comparator, String... java. to usethe names of the properties and/or fields of the elements the comparator should be used for elementPropertyOrFieldNames)This method is used with
When using
and when using | |
Returns: this assertions objectthe comparator, Class<T> java. to usethe type)java. of the type of the element fields the comparator should be used forThis method is used with
When using
and when using | |
Returns: this assertion object.the field names to exclude in the elements comparison. fields)This method is deprecated because it performs a shallow field by field comparison, i.e. elements are
compared field by field but the fields are compared with equals, use | |
Returns: this assertion object.the fields/properties to compare using element comparators fields)This method is deprecated because it performs a shallow field by field comparison, i.e. elements are
compared field by field but the fields are compared with equals, use | |
Returns: this assertion object.This method is deprecated because it performs a shallow field by field comparison, i.e. elements are compared
field by field but the fields are compared with equals, use | |
Returns: this assertion object.the given other)LocalDateTime.Use | |
Returns: this assertion object.the given other)LocalDateTime.Use | |
Returns: this assertion object.the given other)LocalDateTime.Use | |
Returns: this assertion object.the given other)LocalTime.Use | |
Returns: this assertion object.the given other)LocalTime.Use | |
Returns: a new assertion object whose object under test is the array containing the extracted map valuesthe keys used to get values from the map under test keys)use | |
Returns: a newObjectAssert instance whose object under test is the extracted map valuethe key used to get value from the map under test key)use | |
org.
Custom element Comparator is not supported for MapEntry comparison. | |
org.
the comparator to use for incoming assertion checks. customComparator)Custom element Comparator is not supported for MapEntry comparison. | |
Returns: this assertions objectthe comparator, String... java. to usethe names of the properties and/or fields of the elements the comparator should be used for elementPropertyOrFieldNames)This method is used with
When using
and when using | |
Returns: this assertions objectthe comparator, Class<C> java. to usethe type)java. of the type of the element fields the comparator should be used forThis method is used with
When using
and when using | |
Returns: this assertion object.the name of the fields to ignore fields)This method is deprecated because it performs a shallow field by field comparison, i.e. elements are
compared field by field but the fields are compared with equals, use | |
Returns: this assertion object.the name of the fields to use the element comparator on fields)This method is deprecated because it performs a shallow field by field comparison, i.e. elements are
compared field by field but the fields are compared with equals, use | |
Returns: this assertion object.This method is deprecated because it performs a shallow field by field comparison, i.e. elements are compared
field by field but the fields are compared with equals, use | |
Returns: this assertions objectthe object to compare other)actual to.Use the recursive comparison by calling This method is deprecated because it only compares the first level of fields while the recursive comparison traverses all fields recursively (only stopping at java types). For example suppose actual and expected are of type A which has the following structure:
isEqualToComparingFieldByField will compare actual and expected A.b and A.i fields but not B fields
(it calls B equals method instead comparing B fields).The recursive comparison on the other hand will introspect B fields and then C fields and will compare actual and expected respective fields values, that is: A.i, A.B.s, A.B.C.s and A.B.C.d.
Concretely instead of writing:
You should write:
Original javadoc
Asserts that actual object is equal to the given object based on a property/field by property/field comparison (including
inherited ones). This can be handy if
Note that comparison is not recursive, if one of the field is an Object, it will be compared to the other
field using its If an object has a field and a property with the same name, the property value will be used over the field.
Private fields are used in comparison but this can be disabled using
The objects to compare can be of different types but the properties/fields used in comparison must exist in both, for example if actual object has a name String field, it is expected the other object to also have one. Example:
| |
Returns: this assertion object.the object to compare other)actual to.Prefer calling
The recursive comparison handles cycles. By default
You can specify a custom comparator per (nested) fields or type with respectively The objects to compare can be of different types but must have the same properties/fields. For example if actual object has a name String field, it is expected the other object to also have one. If an object has a field and a property with the same name, the property value will be used over the field. Example:
| |
Returns: this assertion object.the object to compare other, String... actual to.properties/fields used in comparison. propertiesOrFieldsUsedInComparison)Use the recursive comparison by calling
Warning: the recursive comparison does not provide a strictly equivalent feature, instead it provides several ways to ignore
fields in the comparison This method is deprecated because it only compares the first level of fields while the recursive comparison traverses all fields recursively (only stopping at java types). For example suppose actual and expected are of type A which has the following structure:
isEqualToComparingOnlyGivenFields will compare actual and expected A.b and A.i fields but not B fields
(it calls B equals method instead comparing B fields).The recursive comparison on the other hand will introspect B fields and then C fields and will compare actual and expected respective fields values, that is: A.i, A.B.s, A.B.C.s and A.B.C.d.
Assuming actual has 4 fields f1, f2, f3, f4, instead of writing:
You should write:
Original javadoc
Asserts that the actual object is equal to the given one using a property/field by property/field comparison on the given properties/fields only
(fields can be inherited fields or nested fields). This can be handy if
Note that comparison is not recursive, if one of the field is an Object, it will be compared to the other
field using its If an object has a field and a property with the same name, the property value will be used over the field.
Private fields are used in comparison but this can be disabled using
The objects to compare can be of different types but the properties/fields used in comparison must exist in both, for example if actual object has a name String field, it is expected the other object to also have one. Example:
| |
Returns: this assertion object.the object to compare other, String... actual to.ignored properties/fields to ignore in comparison. propertiesOrFieldsToIgnore)Use the recursive comparison by calling This method is deprecated because it only compares the first level of fields while the recursive comparison traverses all fields recursively (only stopping at java types). For example suppose actual and expected are of type A which has the following structure:
isEqualToIgnoringGivenFields will compare actual and expected A.b and A.i fields but not B fields
(it calls B equals method instead comparing B fields).The recursive comparison on the other hand will introspect B fields and then C fields and will compare actual and expected respective fields values, that is: A.i, A.B.s, A.B.C.s and A.B.C.d.
Concretely instead of writing:
You should write:
Note that the recursive comparison also allows to ignore fields
Asserts that the actual object is equal to the given one by comparing their properties/fields except for the given ones
(inherited ones are taken into account). This can be handy if
Note that comparison is not recursive, if one of the property/field is an Object, it will be compared to the other
field using its If an object has a field and a property with the same name, the property value will be used over the field.
Private fields are used in comparison but this can be disabled using
The objects to compare can be of different types but the properties/fields used in comparison must exist in both, for example if actual object has a name String field, it is expected the other object to also have one. Example:
| |
Returns: this assertion object.the object to compare other)actual to.Use the recursive comparison by calling This method is deprecated because it only compares the first level of fields while the recursive comparison traverses all fields recursively (only stopping at java types). For example suppose actual and expected are of type A which has the following structure:
isEqualToIgnoringNullFields will compare actual and expected A.b and A.i fields but not B fields
(it calls B equals method instead comparing B fields).The recursive comparison on the other hand will introspect B fields and then C fields and will compare actual and expected respective fields values, that is: A.i, A.B.s, A.B.C.s and A.B.C.d.
Concretely instead of writing:
You should write:
Note that the recursive comparison also allows to ignore actual's null fields with
Asserts that the actual object is equal to the given one by comparing actual's properties/fields with other's not null properties/fields only (including inherited ones). It means that if an actual field is not null and the corresponding field in other is null, this field will be ignored in comparison, but the opposite will make assertion fail (null field in actual, not null in other) as the field is used in the performed comparison and the values differ.
Note that comparison is not recursive, if one of the field is an Object, it will be compared to the other
field using its If an object has a field and a property with the same name, the property value will be used over the field.
Private fields are used in comparison but this can be disabled using
The objects to compare can be of different types but the properties/fields used in comparison must exist in both, for example if actual object has a name String field, it is expected other object to also have one. Example:
| |
Returns: this assertion object.the given other)java..Use | |
Returns: this assertion object.the given other)java..Use | |
Returns: this assertion object.the given other)java..Use | |
Returns: this assertion object.the given other)java..Use | |
Returns: this assertion object.the given other)java..Use | |
Returns: this assertion object.the given other)java..Use | |
Returns: this assertion object.This method is deprecated because it performs a shallow field by field comparison, i.e. elements are compared
field by field but the fields are compared with equals, use
See https://assertj.github.io/doc/#assertj-core-recursive-comparison | |
Returns: this assertion object.the given expected)Path to compare the actual Path to.use
Verifies that the content of the actual
| |
Returns: this assertion object.the given expected, Charset Path to compare the actual Path to.the expectedCharset)Charset used to read the content of the expected Path.use
Verifies that the content of the actual Examples:
| |
Returns: a newByteArrayAssert instance whose array under test is the result of the decoding.use Decodes the actual value as a Base64 encoded string, the decoded bytes becoming the new array under test. Examples:
| |
Returns: a new assertion objectuse Returns a new assertion object that uses the cause of the current Throwable as the actual Throwable under test. Examples:
| |
Returns: a new assertion objectuse Returns a new assertion object that uses the root cause of the current Throwable as the actual Throwable under test. Examples:
| |
Returns: this assertion object.the given other)ZonedDateTime.Use | |
Returns: this assertion object.the given other)ZonedDateTime.Use | |
Returns: this assertion object.the given other)ZonedDateTime.Use | |
Returns: this assertion object.the given other)ZonedDateTime.Use | |
Returns: a list assertion objectuse | |
org.
Throws | |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. shouldRaiseThrowable,The type of exception that the code is expected to raise. type)use | |
Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. shouldRaiseThrowable,The type of exception that the code is expected to raise. type)use | |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
org.
This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
org.
This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
org.
This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
org.
the comparator to use for the incoming assertion checks. customComparator)Custom Comparator is not supported for Boolean comparison. | |
org.
the comparator to use for the incoming assertion checks. customComparator, String comparator description to be used in assertion error messages customComparatorDescription)Custom Comparator is not supported for Boolean comparison. | |
Returns: this assertions objectthe comparator, String... java. to usethe names of the properties and/or fields of the elements the comparator should be used for elementPropertyOrFieldNames)This method is used with
When using
and when using | |
Returns: this assertions objectthe comparator, Class<C> java. to usethe type)java. of the type of the element fields the comparator should be used forThis method is used with
When using
and when using | |
Returns: this assertion object.the names of the fields/properties to ignore fields)This method is deprecated because it performs a shallow field by field comparison, i.e. elements are
compared field by field but the fields are compared with equals, use | |
Returns: this assertion object.the fields to compare field/property by field/property. fields)This method is deprecated because it performs a shallow field by field comparison, i.e. elements are
compared field by field but the fields are compared with equals, use | |
Returns: this assertion object.This method is deprecated because it performs a shallow field by field comparison, i.e. elements are compared
field by field but the fields are compared with equals, use | |
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)use | |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
org.
This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
org.
This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
org.
This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
org.
| |
org.
use
Second, the failures are recognized by IDE's (like IntelliJ IDEA) which open a comparison window.
| |
org.
use
Second, the failures are recognized by IDE's (like IntelliJ IDEA) which open a comparison window.
| |
org.
For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.
Assertions compatible with Android. Duplicated from | |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. shouldRaiseThrowable,The type of exception that the code is expected to raise. type)use | |
org.
For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.
Android-compatible BDD-style assertions duplicated from | |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
org.
For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.
BDD-style Android-compatible soft assertions. Duplicated from | |
org.
For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.
Duplicate of | |
org.
For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.
JUnitSoftAssertions rule compatible with Android. Duplicated from | |
org.
For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.
Soft assertions compatible with Android. Duplicated from | |
org.
use | |
Returns: this assertion object.the given iterable)Iterable we will get elements from.
| |
org.
| |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, Class<ELEMENT_ASSERT> the class used to create the elements assert instance. assertClass)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: the created assertion object.the actual value. actual, AssertFactory<ELEMENT, ELEMENT_ASSERT> the factory used to create the elements assert instance. assertFactory)This was added to help creating type-specific assertions for the elements of an Deprecated way:
However, there is a better way with InstanceOfAssertFactory and the corresponding
first(InstanceOfAssertFactory).
New way:
The main advantage of the latter is easier discoverability and the use of InstanceOfAssertFactory which is the
preferred way to create type-specific assertions in AssertJ API.
| |
Returns: The captured exception ornull if none was raised by the callable.The lambda with the code that should raise the exception. shouldRaiseThrowable,The type of exception that the code is expected to raise. type)use | |
org.
type of element from which the conversion happens F, target element type T>use | |
org.
This functionality (and more) has been rolled into | |
Returns: true if it exactly matches this field, false otherwisefield path to check fieldPath)use | |
Returns: true if it exactly matches this field, false otherwisefield to check field)use | |
org.
don't use it or favor | |
Returns: the createdErrorMessageFactory.the actual value in the failed assertion. actual, Comparable<? super T> the lower boundary of range. start, Comparable<? super T> the lower boundary of range. end, boolean whether to include start value in range. inclusiveStart, boolean whether to include end value in range. inclusiveEnd, ComparisonStrategy the comparisonStrategy)ComparisonStrategy used to evaluate assertion.Use | |
org.
Deprecated as a consequence of | |
Returns: the createdAssertionErrorFactory.the actual value in the failed assertion. actual, Object the expected value in the failed assertion. expected, Representation the representation)Representation used to format values.Deprecated as a consequence of | |
Returns: the createdAssertionErrorFactory.the actual value in the failed assertion. actual, Object the expected value in the failed assertion. expected, ComparisonStrategy the comparisonStrategy, Representation ComparisonStrategy used to compare actual with expected.the representation)Representation used to format values.Deprecated as a consequence of | |
Returns: the createdErrorMessageFactory.the actual value in the failed assertion. actual, Comparable<? super T> the value used in the failed assertion to compare the actual value to. other, ComparisonStrategy the comparisonStrategy)ComparisonStrategy used to evaluate assertion.Use | |
Returns: the createdErrorMessageFactory.the actual value in the failed assertion. actual, Comparable<? super T> the value used in the failed assertion to compare the actual value to. other, ComparisonStrategy the comparisonStrategy)ComparisonStrategy used to evaluate assertion.Use | |
Returns: the createdErrorMessageFactory.the actual value in the failed assertion. actual, T the value used in the failed assertion to compare the actual value to. other, ComparisonStrategy the comparisonStrategy)ComparisonStrategy used to evaluate assertion.Use | |
Returns: the createdErrorMessageFactory.the actual value in the failed assertion. actual, Comparable<? super T> the value used in the failed assertion to compare the actual value to. other, ComparisonStrategy the comparisonStrategy)ComparisonStrategy used to evaluate assertion.Use | |
Returns: the created.contains information about the failed assertion. info, AssertionErrorFactory knows how to create factory)AssertionErrors.Deprecated as a consequence of | |
org.
This comparator is deprecated because it performs a shallow field by field comparison, i.e. elements are compared
field by field but the fields are compared with equals, use | |
org.
This comparator is deprecated because it performs a shallow field by field comparison, i.e. elements are compared
field by field but the fields are compared with equals, use | |
org.
This comparator is deprecated because it performs a shallow field by field comparison, i.e. elements are compared
field by field but the fields are compared with equals, use | |
org.
the file or directory to delete. file)use https://commons.apache.org/proper/commons-io/javadocs/api-release/org/apache/commons/io/FileUtils.html#forceDelete-java.io.File- instead | |
Returns: the system's temporary directory.Use either | |
Returns: an empty, immutableList.use | |
Returns: theString representation of the given map.the map to format. map)use | |
Returns: theString representation of the given map.the p, Map<?, ?> Representation to use.the map to format. map)use | |
Returns: true if the arguments are deeply equal to each other, false otherwise.an object. o1, Object an object to be compared with o2)o1 for deep equality.Use | |
Returns: true if the arguments are arrays and deeply equal to each other, false otherwise.an object. o1, Object an object to be compared with o2)o1 for deep equality.Use either | |
Returns: the non-null reference that was validated.the given object reference. reference)use | |
Returns: the non-null reference that was validated.the given object reference. reference, String error message in case of null reference. message)use |