aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/model/ExtendedInfoFormatterTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/org/traccar/model/ExtendedInfoFormatterTest.java')
-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>");
+
+ }
+
+}