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 --- test/org/traccar/model/MiscFormatterTest.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/org/traccar/model/MiscFormatterTest.java (limited to 'test/org/traccar/model/MiscFormatterTest.java') 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