aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorseym45 <seym45@gmail.com>2023-07-24 20:34:00 +0400
committerseym45 <seym45@gmail.com>2023-07-24 20:52:46 +0400
commit103fbde721753b8be65c39e0e9118943c6bebc68 (patch)
treed0f6bec4abbe42ec6a5c1bac537e1efcf49d9135 /src/test/java
parent09daf15be1a874a8880645d4595e1b57d4cf2eee (diff)
downloadtrackermap-server-103fbde721753b8be65c39e0e9118943c6bebc68.tar.gz
trackermap-server-103fbde721753b8be65c39e0e9118943c6bebc68.tar.bz2
trackermap-server-103fbde721753b8be65c39e0e9118943c6bebc68.zip
Add Gator content encoder and test snippets
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/protocol/GatorProtocolEncoderTest.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/test/java/org/traccar/protocol/GatorProtocolEncoderTest.java b/src/test/java/org/traccar/protocol/GatorProtocolEncoderTest.java
index 7e8f51008..74ac35440 100644
--- a/src/test/java/org/traccar/protocol/GatorProtocolEncoderTest.java
+++ b/src/test/java/org/traccar/protocol/GatorProtocolEncoderTest.java
@@ -4,16 +4,22 @@ import org.junit.jupiter.api.Test;
import org.traccar.ProtocolTest;
import org.traccar.model.Command;
-import java.nio.charset.StandardCharsets;
-
import static org.junit.jupiter.api.Assertions.assertEquals;
public class GatorProtocolEncoderTest extends ProtocolTest {
@Test
- void encodeId() throws Exception {
+ void encodeId() throws Exception {
var encoder = inject(new GatorProtocolEncoder(null));
assertEquals("2008958C", encoder.encodeId(13332082112L));
+ }
+ @Test
+ public void testEncode() throws Exception {
+ var encoder = inject(new GatorProtocolEncoder(null));
+ Command command = new Command();
+ command.setDeviceId(13332082112L);
+ command.setType(Command.TYPE_ROLLCALL);
+ verifyCommand(encoder, command, binary("24243000062008958C070D"));
}
}