From c4c127d7c116241865ef7e710585ef04ddd60ce8 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 7 May 2015 09:41:50 +1200 Subject: Improve double and float format --- .../traccar/model/ExtendedInfoFormatterTest.java | 20 -------------------- test/org/traccar/model/MiscFormatterTest.java | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 20 deletions(-) delete mode 100644 test/org/traccar/model/ExtendedInfoFormatterTest.java create mode 100644 test/org/traccar/model/MiscFormatterTest.java (limited to 'test/org/traccar/model') diff --git a/test/org/traccar/model/ExtendedInfoFormatterTest.java b/test/org/traccar/model/ExtendedInfoFormatterTest.java deleted file mode 100644 index 9c8c86b4e..000000000 --- a/test/org/traccar/model/ExtendedInfoFormatterTest.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.traccar.model; - -import static org.junit.Assert.assertEquals; -import org.junit.Test; - -public class ExtendedInfoFormatterTest { - - @Test - public void testToString() throws Exception { - - Position position = new Position(); - position.set("a", "1"); - position.set("b", "2"); - position.set("a", "3"); - - assertEquals(position.getOther(), "32"); - - } - -} diff --git a/test/org/traccar/model/MiscFormatterTest.java b/test/org/traccar/model/MiscFormatterTest.java new file mode 100644 index 000000000..94241f95c --- /dev/null +++ b/test/org/traccar/model/MiscFormatterTest.java @@ -0,0 +1,21 @@ +package org.traccar.model; + +import static org.junit.Assert.assertEquals; +import org.junit.Test; + +public class MiscFormatterTest { + + @Test + public void testToString() throws Exception { + + Position position = new Position(); + position.set("a", "1"); + position.set("b", "2"); + position.set("a", "3"); + position.set("c", 3.555); + + assertEquals(position.getOther(), "323.56"); + + } + +} -- cgit v1.2.3