From 12ac6af766b92b4d5cfd53957955e1bed4dcc151 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 15 Nov 2015 18:09:05 +1300 Subject: Make LBS unit test asserts stricter --- test/org/traccar/ProtocolDecoderTest.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'test/org') diff --git a/test/org/traccar/ProtocolDecoderTest.java b/test/org/traccar/ProtocolDecoderTest.java index dbb11965b..ef98b3467 100644 --- a/test/org/traccar/ProtocolDecoderTest.java +++ b/test/org/traccar/ProtocolDecoderTest.java @@ -187,29 +187,13 @@ public class ProtocolDecoderTest { Assert.assertFalse("no attributes", attributes.isEmpty()); } - if (attributes.containsKey(Event.KEY_MCC)) { + if (attributes.containsKey(Event.KEY_MCC) || attributes.containsKey(Event.KEY_MNC)) { checkInteger(attributes.get(Event.KEY_MCC), 100, 999); - } - - if (attributes.containsKey(Event.KEY_MNC)) { checkInteger(attributes.get(Event.KEY_MNC), 0, 999); - } - - if (attributes.containsKey(Event.KEY_LAC)) { checkInteger(attributes.get(Event.KEY_LAC), 1, 65535); - } - - if (attributes.containsKey(Event.KEY_CID)) { 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, 268435455); - }*/ - } private void checkInteger(Object value, int min, int max) { -- cgit v1.2.3