public interface BasicObjectTest<E>
| Modifier and Type | Field and Description |
|---|---|
static String |
DATAPOINTS |
static String |
EQUAL_DATAPOINTS |
| Modifier and Type | Method and Description |
|---|---|
net.jqwik.api.Arbitrary<? extends E> |
datapoints() |
default net.jqwik.api.Arbitrary<? extends nl.vpro.util.Pair<E,E>> |
equalDatapoints() |
default void |
equalsIsConsistent(E x,
E y)
For any non-null reference values x and y, multiple invocations
of x.equals(y) consistently return true or consistently return
false, provided no information used in equals comparisons on
the objects is modified.
|
default void |
equalsIsReflexive(E x)
For any non-null reference value x, x.equals(x) should return true
|
default void |
equalsIsSymmetric(E x,
E y)
For any non-null reference values x and y, x.equals(y)
should return true if and only if y.equals(x) returns true.
|
default void |
equalsIsTransitive(nl.vpro.util.Pair<E,E> p1,
nl.vpro.util.Pair<E,E> p2)
For any non-null reference values x, y, and z, if x.equals(y)
returns true and y.equals(z) returns true, then x.equals(z)
should return true.
|
default void |
equalsReturnFalseOnNull(E x)
For any non-null reference value x, x.equals(null); should
return false.
|
default void |
hashCodeIsConsistentWithEquals(nl.vpro.util.Pair<E,E> pair)
If two objects are equal according to the equals(Object) method,
then calling the hashCode method on each of the two objects
must produce the same integer result.
|
default void |
hashCodeIsSelfConsistent(E x)
Whenever it is invoked on the same object more than once
the hashCode() method must consistently return the same
integer.
|
default void |
toString(E object) |
static final String DATAPOINTS
static final String EQUAL_DATAPOINTS
@Property
default void equalsIsReflexive(@ForAll(value="datapoints")
E x)
@Property
default void equalsIsSymmetric(@ForAll(value="datapoints")
E x,
@ForAll(value="datapoints")
E y)
@Property
default void equalsIsTransitive(@ForAll(value="equalDatapoints")
nl.vpro.util.Pair<E,E> p1,
@ForAll(value="equalDatapoints")
nl.vpro.util.Pair<E,E> p2)
@Property
default void equalsIsConsistent(@ForAll(value="datapoints")
E x,
@ForAll(value="datapoints")
E y)
@Property
default void equalsReturnFalseOnNull(@ForAll(value="datapoints")
E x)
@Property
default void hashCodeIsSelfConsistent(@ForAll(value="datapoints")
E x)
@Property
default void hashCodeIsConsistentWithEquals(@ForAll(value="equalDatapoints")
nl.vpro.util.Pair<E,E> pair)
@Property
default void toString(@ForAll(value="datapoints")
E object)
@Provide net.jqwik.api.Arbitrary<? extends E> datapoints()
Copyright © 2021. All rights reserved.