diff options
author | Renaud Allard <renaud@allard.it> | 2016-10-20 07:19:10 +0200 |
---|---|---|
committer | Renaud Allard <renaud@allard.it> | 2016-10-20 07:19:10 +0200 |
commit | 0d347cd7aac2ebfad01c1635f3893964be2e67ae (patch) | |
tree | 176f7fa7faa3600b885b4d19e26e41aee2406a9c /test/org/traccar | |
parent | 38cbe426a9d8850821111efea49250d7fcc02101 (diff) | |
download | trackermap-server-0d347cd7aac2ebfad01c1635f3893964be2e67ae.tar.gz trackermap-server-0d347cd7aac2ebfad01c1635f3893964be2e67ae.tar.bz2 trackermap-server-0d347cd7aac2ebfad01c1635f3893964be2e67ae.zip |
Reuse EvenHandlerTest device
rename log message variable
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/FilterHandlerTest.java | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/test/org/traccar/FilterHandlerTest.java b/test/org/traccar/FilterHandlerTest.java index 9c2ce416e..a03c04536 100644 --- a/test/org/traccar/FilterHandlerTest.java +++ b/test/org/traccar/FilterHandlerTest.java @@ -12,45 +12,13 @@ import org.traccar.model.Device; public class FilterHandlerTest { - static { - Context.init(new IdentityManager() { - - private Device createDevice() { - Device device = new Device(); - device.setId(1); - device.setName("test"); - device.setUniqueId("123456789012345"); - return device; - } - - @Override - public Device getDeviceById(long id) { - return createDevice(); - } - - @Override - public Device getDeviceByUniqueId(String uniqueId) { - return createDevice(); - } - - @Override - public Position getLastPosition(long deviceId) { - return null; - } - - @Override - public boolean isLatestPosition(Position position) { - return true; - } - - }); - } - + private EventHandlerTest deviceHandler; private FilterHandler filtingHandler; private FilterHandler passingHandler; @Before public void setUp() { + deviceHandler = new EventHandlerTest(); passingHandler = new FilterHandler(); filtingHandler = new FilterHandler(); filtingHandler.setFilterInvalid(true); |