use of tech.units.indriya.unit.TransformedUnit in project indriya by unitsofmeasurement.
the class EBNFFormatTest method testTransformed.
@Test
public void testTransformed() {
final String ANGSTROEM_SYM = "\u212B";
final Unit<Length> ANGSTROEM = new TransformedUnit<Length>(ANGSTROEM_SYM, METRE, METRE, new RationalConverter(BigInteger.ONE, BigInteger.TEN.pow(10)));
final String s = format.format(ANGSTROEM);
assertEquals(ANGSTROEM_SYM, s);
}
use of tech.units.indriya.unit.TransformedUnit in project indriya by unitsofmeasurement.
the class SimpleFormatTest method testTransformed.
@Test
public void testTransformed() {
final String ANGSTROEM_SYM = "\u212B";
final Unit<Length> ANGSTROEM = new TransformedUnit<Length>(ANGSTROEM_SYM, METRE, METRE, new RationalConverter(BigInteger.ONE, BigInteger.TEN.pow(10)));
final String s = format.format(ANGSTROEM);
assertEquals(ANGSTROEM_SYM, s);
}
Aggregations