use of tech.units.indriya.quantity.time.TemporalQuantity in project indriya by unitsofmeasurement.
the class TimeQuantitiesTest method ofQuantityTest.
@Test
public void ofQuantityTest() {
Quantity<Time> hour = Quantities.getQuantity(1, Units.HOUR);
TemporalQuantity timeQuantity = TemporalQuantity.of(hour);
assertEquals(SECONDS, timeQuantity.getTemporalUnit());
assertEquals(SECOND, timeQuantity.toUnit());
assertEquals(Integer.valueOf(3600), timeQuantity.getValue());
}
Aggregations