Search in sources :

Example 6 with Mass

use of javax.measure.quantity.Mass in project uom-se by unitsofmeasurement.

the class PrefixTest method testNestedOperationsNotTheSame.

@Test
public void testNestedOperationsNotTheSame() {
    Unit<Mass> m1 = MICRO(GRAM);
    Unit<Mass> m2 = GRAM.divide(1000).divide(2000);
    UnitConverter c1 = m1.getConverterTo(m2);
    List steps1 = c1.getConversionSteps();
    UnitConverter c2 = m2.getConverterTo(m1);
    List steps2 = c2.getConversionSteps();
    assertNotEquals(c1, c2);
    assertNotEquals(m1, m2);
}
Also used : Mass(javax.measure.quantity.Mass) UnitConverter(javax.measure.UnitConverter) List(java.util.List) Test(org.junit.Test)

Aggregations

Mass (javax.measure.quantity.Mass)6 List (java.util.List)4 UnitConverter (javax.measure.UnitConverter)4 Test (org.junit.Test)3 Test (org.junit.jupiter.api.Test)3 Instant (java.time.Instant)2 Ignore (org.junit.Ignore)1 Disabled (org.junit.jupiter.api.Disabled)1