public class ObjectHelper
extends org.assertj.core.api.Assertions
Object.equals(Object)
and Object.hashCode()
.Constructor and Description |
---|
ObjectHelper() |
Modifier and Type | Method and Description |
---|---|
static <T> void |
checkEquals(T x,
T y,
boolean equal)
Generic checks of
Object.equals(Object) . |
static <T> void |
checkEqualsAndHashCode(T x,
T y,
boolean equal)
Generic checks of
Object.equals(Object) and Object.hashCode() . |
static <T> void |
checkHashCode(T x,
T y)
Generic checks of
Object.hashCode() . |
allOf, allOf, anyOf, anyOf, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThatExceptionOfType, assertThatThrownBy, atIndex, catchThrowable, contentOf, contentOf, contentOf, contentOf, contentOf, contentOf, doesNotHave, entry, extractProperty, extractProperty, fail, fail, failBecauseExceptionWasNotThrown, filter, filter, in, linesOf, linesOf, linesOf, linesOf, linesOf, linesOf, not, not, notIn, offset, offset, registerCustomDateFormat, registerCustomDateFormat, setAllowComparingPrivateFields, setAllowExtractingPrivateFields, setLenientDateParsing, setMaxLengthForSingleLineDescription, setRemoveAssertJRelatedElementsFromStackTrace, shouldHaveThrown, tuple, useDefaultDateFormatsOnly, within, within, within, within, within, within, within, withinPercentage, withinPercentage, withinPercentage, withPrecision, withPrecision
public static <T> void checkEqualsAndHashCode(T x, T y, boolean equal)
Object.equals(Object)
and Object.hashCode()
.T
- the generic type of the object to test.x
- the first instance of the object to test.y
- the second instance of the object to test.equal
- - true
if x.equals(y)
is expected, false
otherwise.public static <T> void checkEquals(T x, T y, boolean equal)
Object.equals(Object)
.T
- the generic type of the object to test.x
- the first instance of the object to test.y
- the second instance of the object to test.equal
- - true
if x.equals(y)
is expected, false
otherwise.public static <T> void checkHashCode(T x, T y)
Object.hashCode()
.T
- the generic type of the object to test.x
- the first instance of the object to test.y
- the second instance of the object to test.Copyright © 2001–2016 mmm-Team. All rights reserved.