Search in sources :

Example 1 with PrimitivesValue

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

the class ValueEqualityTest method givenValuesOfCommonTypesWhenTestingValueDescriptorEqualityExpectNotEquals.

@Test
public void givenValuesOfCommonTypesWhenTestingValueDescriptorEqualityExpectNotEquals() {
    Some some = buildSomeValue(module);
    ValueDescriptor someDescriptor = qi4j.api().valueDescriptorFor(some);
    PrimitivesValue primitive = buildPrimitivesValue(module);
    ValueDescriptor primitiveDescriptor = qi4j.api().valueDescriptorFor(primitive);
    assertThat("ValueDescriptors not equal", someDescriptor, not(equalTo(primitiveDescriptor)));
    assertThat("ValueDescriptors hashcode not equal", someDescriptor.hashCode(), not(equalTo(primitiveDescriptor.hashCode())));
}
Also used : AnotherSome(org.qi4j.runtime.property.PropertyEqualityTest.AnotherSome) Some(org.qi4j.runtime.property.PropertyEqualityTest.Some) PrimitivesValue(org.qi4j.runtime.property.PropertyEqualityTest.PrimitivesValue) PropertyEqualityTest.buildPrimitivesValue(org.qi4j.runtime.property.PropertyEqualityTest.buildPrimitivesValue) ValueDescriptor(org.qi4j.api.value.ValueDescriptor) 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 PrimitivesValue (org.qi4j.runtime.property.PropertyEqualityTest.PrimitivesValue)1 Some (org.qi4j.runtime.property.PropertyEqualityTest.Some)1 PropertyEqualityTest.buildPrimitivesValue (org.qi4j.runtime.property.PropertyEqualityTest.buildPrimitivesValue)1 AbstractQi4jTest (org.qi4j.test.AbstractQi4jTest)1