diff options
Diffstat (limited to 'test/org/traccar/ProtocolDecoderTest.java')
-rw-r--r-- | test/org/traccar/ProtocolDecoderTest.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/org/traccar/ProtocolDecoderTest.java b/test/org/traccar/ProtocolDecoderTest.java index 2906f2002..8f7ed628b 100644 --- a/test/org/traccar/ProtocolDecoderTest.java +++ b/test/org/traccar/ProtocolDecoderTest.java @@ -187,12 +187,17 @@ public class ProtocolDecoderTest { Assert.assertFalse("no attributes", attributes.isEmpty()); } - /*if (attributes.containsKey(Event.KEY_LAC) || attributes.containsKey(Event.KEY_CID)) { + 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), 1, 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); - checkInteger(attributes.get(Event.KEY_LAC), 1, 65535); - checkInteger(attributes.get(Event.KEY_CID), 1, 65535); - }*/ + Assert.assertTrue("value missing", attributes.containsKey(Event.KEY_LAC)); + Assert.assertTrue("value missing", attributes.containsKey(Event.KEY_CID)); + } } |