5454import static javax .measure .test .unit .TimeUnit .*;
5555import static javax .measure .test .unit .VolumeUnit .*;
5656
57+ /**
58+ * JUnit tests for the 24 prefixes used in the metric system (decimal multiples and submultiples of units).
59+ *
60+ * @author <a href="mailto:werner@units.tech">Werner Keil</a>
61+ * @version 2.2, May 9, 2023
62+ * @since 2.0
63+ */
5764public class MetricPrefixTest {
5865 @ Test
5966 public void testAtto () {
@@ -83,6 +90,13 @@ public void testDeci() {
8390
8491 @ Test
8592 public void testDeca () {
93+ assertEquals ("da" , DECA .getSymbol ());
94+ Quantity <Volume > v1 = TestQuantities .getQuantity (1.0 , DECA (litre ));
95+ assertEquals ("0.01" , v1 .getUnit ().toString ());
96+ }
97+
98+ @ Test
99+ public void testDeka () {
86100 assertEquals ("da" , DECA .getSymbol ());
87101 Quantity <Volume > v1 = TestQuantities .getQuantity (1.0 , DEKA (litre ));
88102 assertEquals ("0.01" , v1 .getUnit ().toString ());
@@ -153,7 +167,7 @@ public void testMicro() {
153167 assertEquals ("m" , m1 .getUnit ().getSymbol ());
154168
155169 Quantity <Length > m2 = m1 .to (MICRO (m ));
156- assertNull (m2 ); // TODO temporary workaround
170+ assertNull (m2 ); // the unit model in the test implementation is only partial, hence null here
157171 }
158172
159173 @ Test
@@ -163,7 +177,7 @@ public void testNano() {
163177 assertEquals ("m" , m1 .getUnit ().getSymbol ());
164178
165179 Quantity <Length > m2 = m1 .to (NANO (m ));
166- assertNull (m2 ); // TODO temporary workaround
180+ assertNull (m2 ); // the unit model in the test implementation is only partial, hence null here
167181 }
168182
169183 @ Test
0 commit comments