From 94e41957eb8aa53a6285e2fe3188f589640f0091 Mon Sep 17 00:00:00 2001 From: Lucas V C Nicolau Date: Mon, 25 Nov 2019 14:16:11 -0300 Subject: Update Xrb28ProtocolDecoderTest.java add new regex matching test cases --- src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/test/java/org/traccar/protocol') diff --git a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java index 0f15f31b4..9156182b7 100644 --- a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java @@ -27,6 +27,12 @@ public class Xrb28ProtocolDecoderTest extends ProtocolTest { verifyPosition(decoder, text( "*SCOR,OM,863158022988725,D0,0,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); + + verifyPosition(decoder, text( + "*HBCR,OM,123456789123456,D0,1,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); + + verifyPosition(decoder, text( + "*SCOR,OM,863158022988725,D0,1,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); } -- cgit v1.2.3 From 89abb77cf63519d60a41f63291ac8277d79f5c2a Mon Sep 17 00:00:00 2001 From: Lucas V C Nicolau Date: Mon, 25 Nov 2019 15:12:42 -0300 Subject: new tests with real data --- .../traccar/protocol/Xrb28ProtocolDecoderTest.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/test/java/org/traccar/protocol') diff --git a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java index 9156182b7..c280cc2c7 100644 --- a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java @@ -27,12 +27,24 @@ public class Xrb28ProtocolDecoderTest extends ProtocolTest { verifyPosition(decoder, text( "*SCOR,OM,863158022988725,D0,0,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); - - verifyPosition(decoder, text( - "*HBCR,OM,123456789123456,D0,1,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); verifyPosition(decoder, text( - "*SCOR,OM,863158022988725,D0,1,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); + "*SCOR,NG,868020030346166,D0,1,020047.000,A,2359.35484,S,04615.26737,W,14,0.77,161119,-11.87,M,A#")); + + verifyPosition(decoder, text( + "*SCOR,NG,868020030485741,D0,1,020249.000,A,2359.36260,S,04615.24544,W,13,0.77,201119,13.52,M,A#")); + + verifyPosition(decoder, text( + "*SCOR,NG,868020030491178,D0,1,020533.000,A,2359.34836,S,04615.24559,W,16,0.68,111119,40.97,M,A#")); + + verifyPosition(decoder, text( + "*SCOR,NG,868020030432826,D0,1,020522.000,A,2359.36061,S,04615.24528,W,14,0.76,191119,16.50,M,A#")); + + verifyPosition(decoder, text( + "*SCOR,NG,868020030308430,D0,1,020455.00,A,2359.36129,S,04615.24677,W,12,0.72,201119,8.5,M,A#")); + + verifyPosition(decoder, text( + "*SCOR,NG,868020030485741,D0,1,020519.000,A,2359.36247,S,04615.24459,W,14,0.74,201119,13.56,M,A#")); } -- cgit v1.2.3 From 26020f101b9e0781c5b9a1b5528ea202ab239450 Mon Sep 17 00:00:00 2001 From: Lucas V C Nicolau Date: Mon, 25 Nov 2019 15:14:58 -0300 Subject: only one test --- .../org/traccar/protocol/Xrb28ProtocolDecoderTest.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/test/java/org/traccar/protocol') diff --git a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java index c280cc2c7..0512b2d73 100644 --- a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java @@ -29,22 +29,7 @@ public class Xrb28ProtocolDecoderTest extends ProtocolTest { "*SCOR,OM,863158022988725,D0,0,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); verifyPosition(decoder, text( - "*SCOR,NG,868020030346166,D0,1,020047.000,A,2359.35484,S,04615.26737,W,14,0.77,161119,-11.87,M,A#")); - - verifyPosition(decoder, text( - "*SCOR,NG,868020030485741,D0,1,020249.000,A,2359.36260,S,04615.24544,W,13,0.77,201119,13.52,M,A#")); - - verifyPosition(decoder, text( - "*SCOR,NG,868020030491178,D0,1,020533.000,A,2359.34836,S,04615.24559,W,16,0.68,111119,40.97,M,A#")); - - verifyPosition(decoder, text( - "*SCOR,NG,868020030432826,D0,1,020522.000,A,2359.36061,S,04615.24528,W,14,0.76,191119,16.50,M,A#")); - - verifyPosition(decoder, text( - "*SCOR,NG,868020030308430,D0,1,020455.00,A,2359.36129,S,04615.24677,W,12,0.72,201119,8.5,M,A#")); - - verifyPosition(decoder, text( - "*SCOR,NG,868020030485741,D0,1,020519.000,A,2359.36247,S,04615.24459,W,14,0.74,201119,13.56,M,A#")); + "*SCOR,NG,868020030346166,D0,1,020047.000,A,2359.35484,S,04615.26737,W,14,0.77,161119,-11.87,M,A#")) } -- cgit v1.2.3 From 3ee1cb4560bc989275061badf9b916c0ed367ae1 Mon Sep 17 00:00:00 2001 From: Lucas V C Nicolau Date: Mon, 25 Nov 2019 15:33:48 -0300 Subject: Update Xrb28ProtocolDecoderTest.java --- src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/java/org/traccar/protocol') diff --git a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java index 0512b2d73..20adacd6b 100644 --- a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java @@ -29,7 +29,7 @@ public class Xrb28ProtocolDecoderTest extends ProtocolTest { "*SCOR,OM,863158022988725,D0,0,124458.00,A,2237.7514,N,11408.6214,E,6,0.21,151216,10,M,A#")); verifyPosition(decoder, text( - "*SCOR,NG,868020030346166,D0,1,020047.000,A,2359.35484,S,04615.26737,W,14,0.77,161119,-11.87,M,A#")) + "*SCOR,NG,868020030308430,D0,1,020455.00,A,2359.36129,S,04615.24677,W,12,0.72,201119,8.5,M,A#")); } -- cgit v1.2.3