aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-15 18:09:05 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-15 18:09:05 +1300
commit12ac6af766b92b4d5cfd53957955e1bed4dcc151 (patch)
tree3a13b7f75a74c3ac9e423f29d7016196d94ab898 /test
parent3ba58a7d025c33c5f4e5e2d595158ecf9f420008 (diff)
downloadtraccar-server-12ac6af766b92b4d5cfd53957955e1bed4dcc151.tar.gz
traccar-server-12ac6af766b92b4d5cfd53957955e1bed4dcc151.tar.bz2
traccar-server-12ac6af766b92b4d5cfd53957955e1bed4dcc151.zip
Make LBS unit test asserts stricter
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/ProtocolDecoderTest.java18
1 files changed, 1 insertions, 17 deletions
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) {