Skip to content
This repository was archived by the owner on Sep 21, 2020. It is now read-only.

Commit de4e616

Browse files
committed
Updated JUnit test
Signed-off-by: Werner Keil <werner.keil@gmx.net>
1 parent ff9c0cd commit de4e616

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/test/java/com/opower/unitsofmeasure/TestUnitJacksonModule.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.fasterxml.jackson.databind.ObjectMapper;
1212

1313
import org.junit.Before;
14+
import org.junit.Ignore;
1415
import org.junit.Test;
1516

1617
import tec.uom.se.unit.Units;
@@ -96,17 +97,21 @@ public void testParseLength() throws Exception {
9697
Unit<?> parsedUnit = parse("\"m\"", Unit.class);
9798
assertEquals("The Unit<Length> in the parsed JSON doesn't match",
9899
Units.METRE, parsedUnit);
99-
100-
// parsedUnit = parse("\"km\"", Unit.class); TODO solve km formatting
101-
// assertEquals("The Unit<Length> in the parsed JSON doesn't match",
102-
// KILO(Units.METRE), parsedUnit);
103100
}
104101

105102
@Test(expected = JsonParseException.class)
106103
public void testParseWithUnrecognizedField() throws Exception {
107104
parse("foobar", Unit.class);
108105
}
109-
106+
107+
@Test
108+
@Ignore
109+
public void testParseLengthKm() throws Exception {
110+
Unit<?> parsedUnit = parse("\"km\"", Unit.class); //TODO solve km formatting
111+
assertEquals("The Unit<Length> in the parsed JSON doesn't match",
112+
KILO(Units.METRE), parsedUnit);
113+
}
114+
110115
protected String serialize(Object objectToSerialize) throws IOException {
111116
final Writer writer = new StringWriter();
112117
final JsonGenerator generator = this.jsonFactory.createJsonGenerator(writer);

0 commit comments

Comments
 (0)