aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-08-02 10:28:25 +0200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-08-02 10:28:25 +0200
commit53486c0fe1bad6adb2324bd596e7528dcec82d26 (patch)
treeb1b1b38cf8ad81f10e9eaf0a6b133c854384ea23 /test/org/traccar
parente77e0e4de5c2c424df8aa6663f986e85e1190db1 (diff)
downloadtraccar-server-53486c0fe1bad6adb2324bd596e7528dcec82d26.tar.gz
traccar-server-53486c0fe1bad6adb2324bd596e7528dcec82d26.tar.bz2
traccar-server-53486c0fe1bad6adb2324bd596e7528dcec82d26.zip
Improve extended formatter
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/model/ExtendedInfoFormatterTest.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/org/traccar/model/ExtendedInfoFormatterTest.java b/test/org/traccar/model/ExtendedInfoFormatterTest.java
new file mode 100644
index 000000000..31161e9e7
--- /dev/null
+++ b/test/org/traccar/model/ExtendedInfoFormatterTest.java
@@ -0,0 +1,20 @@
+package org.traccar.model;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
+public class ExtendedInfoFormatterTest {
+
+ @Test
+ public void testToString() throws Exception {
+
+ ExtendedInfoFormatter extendedInfo = new ExtendedInfoFormatter("test");
+ extendedInfo.set("a", "1");
+ extendedInfo.set("b", "2");
+ extendedInfo.set("a", "3");
+
+ assertEquals(extendedInfo.toString(), "<info><protocol>test</protocol><a>3</a><b>2</b></info>");
+
+ }
+
+}