aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-09-16 20:22:11 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-09-16 20:22:11 -0700
commite94a83c5fdc8b48d5e8f3f537d8b6e3e15e26d51 (patch)
tree975aae0a5025162879c7079676bac396f07ff364 /src/test/java/org
parenta498a5584dc21d8ee3c1bdfe56dd158b789d463e (diff)
downloadtrackermap-server-e94a83c5fdc8b48d5e8f3f537d8b6e3e15e26d51.tar.gz
trackermap-server-e94a83c5fdc8b48d5e8f3f537d8b6e3e15e26d51.tar.bz2
trackermap-server-e94a83c5fdc8b48d5e8f3f537d8b6e3e15e26d51.zip
Ignore invalid data
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/traccar/protocol/GlobalstarProtocolDecoderTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/GlobalstarProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GlobalstarProtocolDecoderTest.java
index f7bf8f514..75d30ec47 100644
--- a/src/test/java/org/traccar/protocol/GlobalstarProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GlobalstarProtocolDecoderTest.java
@@ -11,6 +11,17 @@ public class GlobalstarProtocolDecoderTest extends ProtocolTest {
GlobalstarProtocolDecoder decoder = new GlobalstarProtocolDecoder(null);
+ verifyNull(decoder, request(HttpMethod.POST, "/", buffer(
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",
+ "<stuMessages xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://cody.glpconnect.com/XSD/StuMessage_Rev1_0_1.xsd\" timeStamp=\"16/09/2020 01:33:07 GMT\" messageID=\"567207180ae9100687cef8c81978371a\">\n",
+ "<stuMessage>\n",
+ "<esn>0-4325340</esn>\n",
+ "<unixTime>1600220003</unixTime>\n",
+ "<gps>N</gps>\n",
+ "<payload length=\"9\" source=\"pc\" encoding=\"hex\">0x63FFFF1BB4FFFFFFFF</payload>\n",
+ "</stuMessage>\n",
+ "</stuMessages>")));
+
verifyPositions(decoder, request(HttpMethod.POST, "/", buffer(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
"<stuMessages xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://cody.glpconnect.com/XSD/StuMessage_Rev1_0_1.xsd\" timeStamp=\"25/03/2020 03:02:32 GMT\" messageID=\"300421a0fd2a100585bdde409d6f601a\">",