Skip to content

Commit

Permalink
335: Improve and fix JavaDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
keilw committed Apr 17, 2021
1 parent f974952 commit d07548f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions unicode/src/test/java/systems/uom/unicode/CLDRTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static tech.units.indriya.unit.Units.KILOGRAM;
import static tech.units.indriya.unit.Units.METRE;
import static systems.uom.unicode.CLDR.*;

import java.math.BigDecimal;
Expand All @@ -43,6 +44,7 @@

import org.junit.jupiter.api.Test;

import tech.units.indriya.AbstractUnit;
import tech.units.indriya.function.RationalNumber;
import tech.units.indriya.quantity.Quantities;
import tech.units.indriya.unit.Units;
Expand Down Expand Up @@ -72,4 +74,11 @@ public void testConvert() {
Quantity<Speed> knots = kph.to(CLDR.KNOT);
assertEquals(RationalNumber.of(new BigDecimal("16.19870410367170626349892008639309")), knots.getValue());
}

@Test
public void testParse() {
assertEquals(KILOGRAM, AbstractUnit.parse("kg"));
assertEquals(CARAT, AbstractUnit.parse("ct"));
assertEquals(DECI(METRE), AbstractUnit.parse("dm"));
}
}

0 comments on commit d07548f

Please sign in to comment.