use of org.qi4j.runtime.property.PropertyEqualityTest.Some in project qi4j-sdk by Qi4j.
the class ValueEqualityTest method givenValuesOfDifferentTypesAndSameStateWhenTestingValueStateEqualityExpectEquals.
@Test
public void givenValuesOfDifferentTypesAndSameStateWhenTestingValueStateEqualityExpectEquals() {
Some some = buildSomeValue(module);
AssociationStateHolder someState = qi4j.spi().stateOf((ValueComposite) some);
AnotherSome anotherSome = buildAnotherSomeValue(module);
AssociationStateHolder anotherSomeState = qi4j.spi().stateOf((ValueComposite) anotherSome);
assertThat("ValueStates equal", someState, equalTo(anotherSomeState));
assertThat("ValueStates hashcode equal", someState.hashCode(), equalTo(anotherSomeState.hashCode()));
}
Aggregations