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

Commit 072203d

Browse files
committed
1 parent f90da84 commit 072203d

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<modelVersion>4.0.0</modelVersion>
77
<parent>
8-
<version>0.8-SNAPSHOT</version>
8+
<version>0.8-RC2</version>
99
<artifactId>uom-parent</artifactId>
1010
<groupId>tec.uom</groupId>
1111
</parent>

src/main/java/com/opower/unitsofmeasure/UnitJacksonModule.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public class UnitJacksonModule extends SimpleModule {
2929
private static final long serialVersionUID = 7601584599518016604L;
3030

3131
public UnitJacksonModule() {
32-
super("UnitJsonSerializationModule", new Version(1, 3, 1, null));
32+
super("UnitJsonSerializationModule", new Version(1, 3, 3, null,
33+
UnitJacksonModule.class.getPackage().getName(), "jackson-module-unitsofmeasure"));
3334

3435
addSerializer(Unit.class, new UnitJsonSerializer());
3536
addDeserializer(Unit.class, new UnitJsonDeserializer());

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

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

1313
import org.junit.Before;
14+
import org.junit.Ignore;
1415
import org.junit.Test;
16+
1517
import tec.uom.se.unit.SI;
18+
import tec.uom.se.unit.Units;
1619
import tec.uom.se.unit.ucum.UCUM;
1720

1821
import javax.measure.Unit;
@@ -63,6 +66,14 @@ public void testSerializeLength() throws Exception {
6366
"Expected JSON with a UCUM representation of the length unit",
6467
"\"km\"", serialize(KILO(SI.METRE)));
6568
}
69+
70+
@Test
71+
@Ignore("Currently broken in SE port")
72+
public void testSerializeSpeed() throws Exception {
73+
assertEquals(
74+
"Expected JSON with a UCUM representation of the speed unit",
75+
"\"[kph]\"", serialize(Units.KILOMETRES_PER_HOUR));
76+
}
6677

6778
@Test
6879
public void testParseArea() throws Exception {

0 commit comments

Comments
 (0)