diff options
Diffstat (limited to 'test/org')
-rw-r--r-- | test/org/traccar/FilterHandlerTest.java | 10 | ||||
-rw-r--r-- | test/org/traccar/ProtocolTest.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/CellocatorProtocolEncoderTest.java | 26 |
3 files changed, 31 insertions, 7 deletions
diff --git a/test/org/traccar/FilterHandlerTest.java b/test/org/traccar/FilterHandlerTest.java index 11b4163a1..452592048 100644 --- a/test/org/traccar/FilterHandlerTest.java +++ b/test/org/traccar/FilterHandlerTest.java @@ -1,14 +1,14 @@ package org.traccar; -import java.util.Date; import org.junit.After; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; import org.junit.Before; import org.junit.Test; -import org.traccar.database.IdentityManager; import org.traccar.model.Position; -import org.traccar.model.Device; + +import java.util.Date; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; public class FilterHandlerTest extends BaseTest { diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java index 955e0b788..d4543a06d 100644 --- a/test/org/traccar/ProtocolTest.java +++ b/test/org/traccar/ProtocolTest.java @@ -6,10 +6,8 @@ import org.jboss.netty.handler.codec.http.DefaultHttpRequest; import org.jboss.netty.handler.codec.http.HttpMethod; import org.jboss.netty.handler.codec.http.HttpVersion; import org.junit.Assert; -import org.traccar.database.IdentityManager; import org.traccar.model.CellTower; import org.traccar.model.Command; -import org.traccar.model.Device; import org.traccar.model.Position; import javax.xml.bind.DatatypeConverter; diff --git a/test/org/traccar/protocol/CellocatorProtocolEncoderTest.java b/test/org/traccar/protocol/CellocatorProtocolEncoderTest.java new file mode 100644 index 000000000..89850fb5f --- /dev/null +++ b/test/org/traccar/protocol/CellocatorProtocolEncoderTest.java @@ -0,0 +1,26 @@ +package org.traccar.protocol; + +import org.junit.Ignore; +import org.junit.Test; +import org.traccar.ProtocolTest; +import org.traccar.model.Command; + +public class CellocatorProtocolEncoderTest extends ProtocolTest { + + @Ignore + @Test + public void testEncode() throws Exception { + + CellocatorProtocolEncoder encoder = new CellocatorProtocolEncoder(); + + Command command = new Command(); + command.setDeviceId(1); + command.setType(Command.TYPE_OUTPUT_CONTROL); + command.set(Command.KEY_INDEX, 0); + command.set(Command.KEY_DATA, "1"); + + verifyCommand(encoder, command, binary("4D434750000000000000000000000303101000000000000026")); + + } + +} |