aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-03-21 13:40:50 -0700
committerAnton Tananaev <anton@traccar.org>2023-03-21 13:40:58 -0700
commit2a0b2dee5eecd55f86c51fe2a25f7ac7484d6bde (patch)
treed0f187702e2b665b008de55e2467c6133d8ff17f /src/test/java
parent376df800e0f96b5237640420f7323a5980c0852b (diff)
downloadtrackermap-server-2a0b2dee5eecd55f86c51fe2a25f7ac7484d6bde.tar.gz
trackermap-server-2a0b2dee5eecd55f86c51fe2a25f7ac7484d6bde.tar.bz2
trackermap-server-2a0b2dee5eecd55f86c51fe2a25f7ac7484d6bde.zip
Response after position processed
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/handler/FilterHandlerTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/java/org/traccar/handler/FilterHandlerTest.java b/src/test/java/org/traccar/handler/FilterHandlerTest.java
index 9cb4a3bf2..26281e351 100644
--- a/src/test/java/org/traccar/handler/FilterHandlerTest.java
+++ b/src/test/java/org/traccar/handler/FilterHandlerTest.java
@@ -11,8 +11,8 @@ import org.traccar.session.cache.CacheManager;
import java.util.Date;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.mock;
@@ -71,18 +71,18 @@ public class FilterHandlerTest extends BaseTest {
Position position = createPosition(new Date(), true, 10);
- assertNotNull(filteringHandler.handlePosition(position));
- assertNotNull(passingHandler.handlePosition(position));
+ assertFalse(filteringHandler.filter(position));
+ assertFalse(passingHandler.filter(position));
position = createPosition(new Date(Long.MAX_VALUE), true, 10);
- assertNull(filteringHandler.handlePosition(position));
- assertNotNull(passingHandler.handlePosition(position));
+ assertTrue(filteringHandler.filter(position));
+ assertFalse(passingHandler.filter(position));
position = createPosition(new Date(), false, 10);
- assertNull(filteringHandler.handlePosition(position));
- assertNotNull(passingHandler.handlePosition(position));
+ assertTrue(filteringHandler.filter(position));
+ assertFalse(passingHandler.filter(position));
}
@@ -92,7 +92,7 @@ public class FilterHandlerTest extends BaseTest {
Position position = createPosition(new Date(), true, 0);
position.set(Position.KEY_ALARM, Position.ALARM_GENERAL);
- assertNotNull(filteringHandler.handlePosition(position));
+ assertFalse(filteringHandler.filter(position));
}