aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-08 11:07:43 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-08 11:07:43 +1200
commit4d9187e2ee98eee17d4adbcb84379e2c68fe2bcd (patch)
tree0751e189301c050e3a66ef25326190ea54fc7f92 /test
parente26b25c7c35cb99f3e0fb114bcedd76f090e0c3b (diff)
downloadtraccar-server-4d9187e2ee98eee17d4adbcb84379e2c68fe2bcd.tar.gz
traccar-server-4d9187e2ee98eee17d4adbcb84379e2c68fe2bcd.tar.bz2
traccar-server-4d9187e2ee98eee17d4adbcb84379e2c68fe2bcd.zip
Migrate L, M, N protocols
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/protocol/MeitrackProtocolDecoderTest.java11
-rw-r--r--test/org/traccar/protocol/MxtProtocolDecoderTest.java22
-rw-r--r--test/org/traccar/protocol/NavigilProtocolDecoderTest.java6
-rw-r--r--test/org/traccar/protocol/NavisProtocolDecoderTest.java14
-rw-r--r--test/org/traccar/protocol/NoranProtocolDecoderTest.java22
5 files changed, 33 insertions, 42 deletions
diff --git a/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java b/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java
index 8748c751c..96549d865 100644
--- a/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java
@@ -1,6 +1,5 @@
package org.traccar.protocol;
-import java.nio.ByteOrder;
import org.junit.Test;
import org.traccar.ProtocolTest;
@@ -11,10 +10,10 @@ public class MeitrackProtocolDecoderTest extends ProtocolTest {
MeitrackProtocolDecoder decoder = new MeitrackProtocolDecoder(new MeitrackProtocol());
- verifyNull(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyNull(decoder, binary(
"242441313038362c3836343530373033313231393937342c4430302c3138303232343037323631345f4331453130395f4e31553144312e6a70672c31342c302cffd8ffdb008400140e0f120f0d14121012171514181e32211e1c1c1e3d2c2e243249404c4b47404645505a736250556d5645466488656d777b8182814e608d978c7d96737e817c011517171e1a1e3b21213b7c5346537c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7cffc000110801e0028003012100021101031101ffdd0004000affc401a20000010501010101010100000000000000000102030405060708090a0b100002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9fa0100030101010101010101010000000000000102030405060708090a0b1100020102040403040705040400010277000102031104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00cca69ac8d06e3348569884db4845021b498a60371494008692980119a8ca7a5342101a5cd5221a0ab312ed1ee68b943e80dce2a467ffd0c806a48e592270f13b230e841a0096eeea7bb09e6c85b667033552800069c2980e14f15422418a916ad099228a95455089505584140993a2d5fb598a7cae72bd8fa536ae892e8e69e2b9d971168a459fffd1ece8a0028a006b534f4a68ce5b9130a89ab444919a61a6c634d34d21894952310d25002514084a4a00ffd2d2349564086929082929805250025140094940c4a4a04251400949408292819fffd3cca31591a098a5c62801a45464531098a69a6210d371400629a6980628eb400c64cd3791c1aa16c491479393563343105424fcc4d007ffd4c3463c0a94500381a5e3b8cd000c99e57f2a8f3835402834e0d4d08914d4aa6ac4c954d4aad4c4c955aa647a6496236ab51b552132e412e383d3f955b0722b09ab32a0c5a2a0d0ffd5ece8a0028a0061a6d5193dc8daa36ab422334c34c634"));
- verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPositions(decoder, binary(
"24246b3131342c3836353738393032343134303439352c4343452c0000000001005000130006011f05010607071415001b00060800000949010a0c000b9b0119a1011afe010602e934ce0203fc9aeb0004309f13220cafc503000d97741e001c01000000010e0ce8000300092f2e060000b7ff2a33330d0a"));
verifyPosition(decoder, buffer(
@@ -23,7 +22,7 @@ public class MeitrackProtocolDecoderTest extends ProtocolTest {
verifyPosition(decoder, buffer(
"$$S214,864507031219974,AAA,109,13.844643,100.644395,171207021520,A,10,28,0,31,0.8,6,390,421327,520|0|0016|000F2DB0,8400,0000|0000|0000|018D|04C6,,,108,0000,,6,0,,,,,11|171207091500|171207091500|78|3500|000000|000003*12"));
- verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPositions(decoder, binary(
"24245f3237382c3836353738393032313434373233322c4343452c5b00000003005000130006012305010608070d15001b0006080000091e010a09000b2e0019a1011af90106025c033300039be60c06044f6678210c6f1806000d48db06001c41000000010e0cf60113002005912b830001ff5000130006012305010608070d15001b0006080000091e010a09000b2e0019a0011af90106025c033300039be60c0604506678210c6f1806000d49db06001c41000000010e0cf60113002005912b830001ff5000130006012305010608070d15001b0006080000091e010a09000b2e0019a1011af90106025c033300039be60c0604516678210c6f1806000d4adb06001c41000000010e0cf60113002005912b830001ff2a37460d0a"));
verifyPosition(decoder, buffer(
@@ -99,11 +98,11 @@ public class MeitrackProtocolDecoderTest extends ProtocolTest {
verifyPosition(decoder, buffer(
"$$J163,123123123123123,AFF,0004,35,58.588926,16.180473,140928192856,A,10,27,0,161,1.2,19,1648894,435695,240|24|88B9|E435,0000,|||0A22|0000,00000001,,50,,,,,,,,,,,,,*70\r\n"));
- verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPositions(decoder, binary(
"24245838362c3336393830303031343039303032312c4343432c020134000100000023381f91ffe354b806c5e3121b0009130000000000000000d33801007cbf0200fe0101000435feeb02000500a3010000000000002a62650d0a"),
position("2014-05-24 04:59:49.000", false, -7.26650, 112.74365));
- verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPositions(decoder, binary(
"2424473937302c3336393830303031333436303637342c4343432c020134005b000000010ce304035db9e000ec6f591a000013000000000c001801edb70200c96d0100e60001004838576501000300a101c20400000000010ce304035db9e000ee6f591a000013000000000c001801edb70200ca6d0100e60001004838576501000300a101c20400000000010ce304035db9e000ef6f591a000013000000000c001801edb70200cc6d0100e60001004838576501000300a101c20400000000020ce304035db9e000f76f591a000016000000000c001801edb70200d36d0100e60001004838576502000300a101bf04000000000a0ce304035db9e000f76f591a000016000000000c001801edb70200d46d0100e60001004838576500000300a101bf0400000000020ce304035db9e000fb6f591a000016000000000c001801edb70200d86d0100e60001004838576502000300a101760400000000180ce304035db9e000fc6f591a0000120000000000008c00edb70200d96d0100e60001004838576502000300a10176040000000019b1e2040323b9e0000b70591a0105150600bb0012002901edb70200e76d0100e60001004838576502000300a2017005000000002023e304031fb9e0001070591a010615070027010d001601fcb70200ec6d0100e60001004838576502000300a201800500000000201fe3040302b9e0001170591a010615090019010d001501feb70200ed6d0100e60001004838576502000300a2018005000000002018e30403dcb8e0001270591a0106150b0011010d00150100b80200ee6d0100e60001004838576502000300a2018005000000002036e3040345b8e0001570591a0107150b002d010b0013010ab80200f16d0100e60001004838576502000300a2018005000000002053e3040326b8e0001670591a0107150d0041010b0013010eb80200f26d0100e60001004838576502000300a2018005000000002070e3040310b8e0001770591a0107150e004f010b00130111b80200f36d0100e60001004838576502000300a2018005000000002095e3040306b8e0001870591a0107150d005a010b00140115b80200f46d0100e60001004838576502000300a20180050000000020b3e3040305b8e0001970591a0107150b0060010b00140118b80200f56d0100e60001004838576502000300a20183050000000020cfe3040308b8e0001a70591a0107150b0066010b0014011bb80200f66d0100e60001004838576502000300a20183050000000020eee304030cb8e0001b70591a0106170b0004000d0014011eb80200f76d0100e60001004838576502000300a2018305000000002a62350d0a"));
}
diff --git a/test/org/traccar/protocol/MxtProtocolDecoderTest.java b/test/org/traccar/protocol/MxtProtocolDecoderTest.java
index 014fcb287..2b0ba6755 100644
--- a/test/org/traccar/protocol/MxtProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MxtProtocolDecoderTest.java
@@ -1,7 +1,5 @@
package org.traccar.protocol;
-import java.nio.ByteOrder;
-
import org.junit.Test;
import org.traccar.ProtocolTest;
@@ -12,34 +10,34 @@ public class MxtProtocolDecoderTest extends ProtocolTest {
MxtProtocolDecoder decoder = new MxtProtocolDecoder(new MxtProtocol());
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"01a631144c7e0008643ad2f456fb2d49747cfe4cbe0ffd002008800000001021000fd43d3f1403000000ff300000f42760001031102445a81fda04"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"01a631361e7a00082471418b052a2c46b587ffc01ae3fd000008800000000000003345422203000000f000f00000000000ea1e04"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"01a63118787d00086440628d226e2bc26a97feac8a3afd10210010308000000000000018003d2b10240000005e2f0000f427f21031feff0000593804"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"01a631bd777d0008646e319e17292ce86798fed4cd3afd102110211030800000102403001f15003e2b102400000034300000f4271021007b175535a7be04"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"01a631e3f97e00087cf40a98151c2cc46898fee0ce3afd1021001030c0000006102116072e003829bb00000036102100001024000000062b0000f42730004b06a6384b4304"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"01a63118787d00086468457a466a2bc26a97feac8a3afd10212010308000000000001fe1053d291024000000922f0000f4271021007b17553599bb04"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"01a63118787d0008648645ec486a2bc26a97feac8a3afd1021001030c0000000001419eb05372b1024000000982a0000f4271021007b17000010308c04"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"01a631e3f97e00087cfa0af3151c2c126798febace3afd1021801030c0000006102122082f003e29bb00000037102100001024000000ab2f0000f42730004b060000488c04"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"01a631e3f97e00087cfe0a4b161c2c126798febace3afd1021801030800000071021240731003e2abb00000038102100001024000000c12f0000f42730004b06a638633104"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"01a63118787d0008648645ec486a2bc26a97feac8a3afd1021001030c0000000001419eb05372b1024000000982a0000f4271021007b17000010308c04"));
}
diff --git a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
index 6c7612f61..5f4175352 100644
--- a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
@@ -1,7 +1,5 @@
package org.traccar.protocol;
-import java.nio.ByteOrder;
-
import org.junit.Test;
import org.traccar.ProtocolTest;
@@ -12,10 +10,10 @@ public class NavigilProtocolDecoderTest extends ProtocolTest {
NavigilProtocolDecoder decoder = new NavigilProtocolDecoder(new NavigilProtocol());
- verifyNull(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyNull(decoder, binary(
"01004300040020000000f60203080200e7cd0f510c0000003b00000000000000"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"0100b3000f0024000000f4a803080200ca0c1151ef8885f0b82e6d130400c00403000000"));
}
diff --git a/test/org/traccar/protocol/NavisProtocolDecoderTest.java b/test/org/traccar/protocol/NavisProtocolDecoderTest.java
index 32dd4739f..14a2e1ad3 100644
--- a/test/org/traccar/protocol/NavisProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NavisProtocolDecoderTest.java
@@ -2,8 +2,6 @@ package org.traccar.protocol;
import org.traccar.ProtocolTest;
-import java.nio.ByteOrder;
-
import org.junit.Test;
public class NavisProtocolDecoderTest extends ProtocolTest {
@@ -13,23 +11,23 @@ public class NavisProtocolDecoderTest extends ProtocolTest {
NavisProtocolDecoder decoder = new NavisProtocolDecoder(new NavisProtocol());
- verifyNull(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyNull(decoder, binary(
"404E5443010000007B000000130044342A3E533A383631373835303035323035303739"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"404e5443010000000000000059009adb2a3e54250000000000ff1500040b0a1008291838001200760ee600000000000000000000000f1500040b0a10ac20703fb1aec23f00000000320149668f430000000000000000000000000000000000000000000000f3808080"),
position("2016-11-11 21:00:04.000", true, 53.74336, 87.14437));
- verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPositions(decoder, binary(
"404e544300000000040000005a00c6812a3e410125e3a60700011705071503011030210c0000fa200910e6000000000000000000000001082106150010ae97643f88a39f3f0000000090001fcc6c450000000000000000000000000000000000000000000000f6808080"));
- verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPositions(decoder, binary(
"404e544301000000000000005a002e6c2a3e410125d7540100001512233a0b0a0f08026300000a000b000b00020000000000000000000c12233b0b0a0f03fd6d3f0fde603f00000000ba0051e0c845000000000000000000000000000000000000000000000080808080"));
- verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPositions(decoder, binary(
"404E5443010000007B0000005A0050692A3E410125DB0E00000015110707110A0C0880630000AA39A2381600020000000000000000000C110708110A0CB389793F1AEF263F00000000120034F516440000000000000000000000FAFF000000FAFF000000FAFF80808080"));
- verifyNull(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyNull(decoder, binary(
"404E5443010000007B000000130047372A3E533A383631373835303035313236303639"));
}
diff --git a/test/org/traccar/protocol/NoranProtocolDecoderTest.java b/test/org/traccar/protocol/NoranProtocolDecoderTest.java
index 1132ec805..f841b7d96 100644
--- a/test/org/traccar/protocol/NoranProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NoranProtocolDecoderTest.java
@@ -1,7 +1,5 @@
package org.traccar.protocol;
-import java.nio.ByteOrder;
-
import org.junit.Test;
import org.traccar.ProtocolTest;
@@ -12,34 +10,34 @@ public class NoranProtocolDecoderTest extends ProtocolTest {
NoranProtocolDecoder decoder = new NoranProtocolDecoder(new NoranProtocol());
- verifyNull(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyNull(decoder, binary(
"0d0a2a4b57000d000080010d0a"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"34000800010b0000000000003f43bb8da6c2ebe229424e523039423233343439000031362d30392d31352030373a30303a303700"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"28003200c380000000469458408c4ad340ad381e3f4e52303947313336303900000001ff00002041"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"28003200c38000d900fcc97a416b1a7a42b43eef3d4e523039473034383737000000000092fcda4a"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"3400080001090000000000001D43A29BE842E62520424E523039423036363932000031322D30332D30352031313A34373A343300"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"34000800010c000000000080a3438e20944149bd07c24e523039423139323832000031352d30342d32362030383a34333a353300"));
- verifyNull(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyNull(decoder, binary(
"0f0000004e52303946303431353500"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"22000800010c008a007e9daa42317bdd41a7f3e2384e523039463034313535000000"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"34000800010c0000000000001c4291251143388d17c24e523039423131303930000031342d31322d32352030303a33333a303700"));
- verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ verifyPosition(decoder, binary(
"34000800010c00000000000000006520944141bd07c24e523039423139323832000031352d30342d32352030303a30333a323200"));
}