Search in sources :

Example 1 with Other

use of org.qi4j.runtime.property.PropertyEqualityTest.Other in project qi4j-sdk by Qi4j.

the class ValueEqualityTest method givenValuesOfDifferentTypesWhenTestingValueDescriptorEqualityExpectNotEquals.

@Test
public void givenValuesOfDifferentTypesWhenTestingValueDescriptorEqualityExpectNotEquals() {
    Some some = buildSomeValue(module);
    ValueDescriptor someDescriptor = qi4j.api().valueDescriptorFor(some);
    Other other = buildOtherValue(module);
    ValueDescriptor otherDescriptor = qi4j.api().valueDescriptorFor(other);
    assertThat("ValueDescriptors not equal", someDescriptor, not(equalTo(otherDescriptor)));
    assertThat("ValueDescriptors hashcode not equal", someDescriptor.hashCode(), not(equalTo(otherDescriptor.hashCode())));
}
Also used : AnotherSome(org.qi4j.runtime.property.PropertyEqualityTest.AnotherSome) Some(org.qi4j.runtime.property.PropertyEqualityTest.Some) ValueDescriptor(org.qi4j.api.value.ValueDescriptor) Other(org.qi4j.runtime.property.PropertyEqualityTest.Other) AbstractQi4jTest(org.qi4j.test.AbstractQi4jTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ValueDescriptor (org.qi4j.api.value.ValueDescriptor)1 AnotherSome (org.qi4j.runtime.property.PropertyEqualityTest.AnotherSome)1 Other (org.qi4j.runtime.property.PropertyEqualityTest.Other)1 Some (org.qi4j.runtime.property.PropertyEqualityTest.Some)1 AbstractQi4jTest (org.qi4j.test.AbstractQi4jTest)1