From f5d56c4fcc88ec0edb3296b6bb572ff30860abd2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 20 May 2013 21:39:50 +1200 Subject: Add unit tests --- test/org/traccar/protocol/H02ProtocolDecoderTest.java | 4 ++++ test/org/traccar/protocol/Pt502ProtocolDecoderTest.java | 3 +++ 2 files changed, 7 insertions(+) (limited to 'test/org/traccar/protocol') diff --git a/test/org/traccar/protocol/H02ProtocolDecoderTest.java b/test/org/traccar/protocol/H02ProtocolDecoderTest.java index 235373113..fe63ea905 100644 --- a/test/org/traccar/protocol/H02ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/H02ProtocolDecoderTest.java @@ -12,6 +12,9 @@ public class H02ProtocolDecoderTest { H02ProtocolDecoder decoder = new H02ProtocolDecoder(null); decoder.setDataManager(new TestDataManager()); + assertNotNull(decoder.decode(null, null, + "*HQ,3800008786,V1,062507,V,3048.2437,N,03058.5617,E,000.00,000,250413,FFFFFBFF")); + assertNotNull(decoder.decode(null, null, "*HQ,123456789012345,V1,155850,A,5214.5346,N,2117.4683,E,0.00,270.90,131012,ffffffff,000000,000000,000000,000000")); @@ -20,6 +23,7 @@ public class H02ProtocolDecoderTest { assertNotNull(decoder.decode(null, null, "*HQ,354188045498669,V1,195200,A,701.8915,S,3450.3399,W,0.00,205.70,050213,ffffffff,000243,000000,000000")); + } diff --git a/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java b/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java index c8a33037c..8fdbd4caf 100644 --- a/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java @@ -25,6 +25,9 @@ public class Pt502ProtocolDecoderTest { /*assertNotNull(decoder.decode(null, null, "$PHO0,6091,233606.000,A,0902.9855,N,06944.3654,W,0.0,43.8,141112,,,A/00010,00000/0/224000//"));*/ + + assertNotNull(decoder.decode(null, null, + "$POS,353451000164,082405.000,A,1254.8501,N,10051.6752,E,0.00,237.99,160513,,,A/0000,0/0/55000//a71/")); } -- cgit v1.2.3