diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-05-26 10:02:37 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-05-26 10:02:37 -0700 |
commit | d3e34416e9825833fa1db02112c56981999df039 (patch) | |
tree | d21b4414b532bfc53c9a905f3caa09f70b43b59e /test/org/traccar/ProtocolTest.java | |
parent | ac2405f0d57fac51fe95aa755f90fe82f26f73bc (diff) | |
parent | aa12e5c750e771016545269ffa39409b06b47eee (diff) | |
download | trackermap-server-d3e34416e9825833fa1db02112c56981999df039.tar.gz trackermap-server-d3e34416e9825833fa1db02112c56981999df039.tar.bz2 trackermap-server-d3e34416e9825833fa1db02112c56981999df039.zip |
Merge pull request #1978 from Abyss777/master
Simplification of the models hierarchy
Diffstat (limited to 'test/org/traccar/ProtocolTest.java')
-rw-r--r-- | test/org/traccar/ProtocolTest.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java index a8f3d13cf..503bc4c00 100644 --- a/test/org/traccar/ProtocolTest.java +++ b/test/org/traccar/ProtocolTest.java @@ -9,12 +9,10 @@ import org.junit.Assert; import org.traccar.database.IdentityManager; import org.traccar.model.Command; import org.traccar.model.Device; -import org.traccar.model.Event; import org.traccar.model.Position; import javax.xml.bind.DatatypeConverter; import java.nio.ByteOrder; -import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.text.DateFormat; import java.text.ParseException; @@ -198,16 +196,16 @@ public class ProtocolTest { Assert.assertFalse("no attributes", attributes.isEmpty()); } - if (attributes.containsKey(Event.KEY_LAC) || attributes.containsKey(Event.KEY_CID)) { - checkInteger(attributes.get(Event.KEY_LAC), 1, 65535); - checkInteger(attributes.get(Event.KEY_CID), 0, 268435455); + if (attributes.containsKey(Position.KEY_LAC) || attributes.containsKey(Position.KEY_CID)) { + checkInteger(attributes.get(Position.KEY_LAC), 1, 65535); + checkInteger(attributes.get(Position.KEY_CID), 0, 268435455); } - if (attributes.containsKey(Event.KEY_MCC) || attributes.containsKey(Event.KEY_MNC)) { - checkInteger(attributes.get(Event.KEY_MCC), 100, 999); - checkInteger(attributes.get(Event.KEY_MNC), 0, 999); - Assert.assertTrue("value missing", attributes.containsKey(Event.KEY_LAC)); - Assert.assertTrue("value missing", attributes.containsKey(Event.KEY_CID)); + if (attributes.containsKey(Position.KEY_MCC) || attributes.containsKey(Position.KEY_MNC)) { + checkInteger(attributes.get(Position.KEY_MCC), 100, 999); + checkInteger(attributes.get(Position.KEY_MNC), 0, 999); + Assert.assertTrue("value missing", attributes.containsKey(Position.KEY_LAC)); + Assert.assertTrue("value missing", attributes.containsKey(Position.KEY_CID)); } } |