diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-03-09 17:04:08 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-03-09 17:04:08 -0800 |
commit | 5c084a0b2961dbfc3cd85a386fefe0b0da6c0c44 (patch) | |
tree | 637b9f89086bad578bbad04fd52e80bf379b8beb /test/org | |
parent | 2a584c67a1663897d98e7c64fe161c88b30ef314 (diff) | |
download | trackermap-server-5c084a0b2961dbfc3cd85a386fefe0b0da6c0c44.tar.gz trackermap-server-5c084a0b2961dbfc3cd85a386fefe0b0da6c0c44.tar.bz2 trackermap-server-5c084a0b2961dbfc3cd85a386fefe0b0da6c0c44.zip |
Refactor ignition event handler
Diffstat (limited to 'test/org')
-rw-r--r-- | test/org/traccar/handler/events/IgnitionEventHandlerTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/org/traccar/handler/events/IgnitionEventHandlerTest.java b/test/org/traccar/handler/events/IgnitionEventHandlerTest.java index 709065c72..dade20fb8 100644 --- a/test/org/traccar/handler/events/IgnitionEventHandlerTest.java +++ b/test/org/traccar/handler/events/IgnitionEventHandlerTest.java @@ -1,26 +1,27 @@ package org.traccar.handler.events; -import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import java.util.Map; import org.junit.Test; import org.traccar.BaseTest; +import org.traccar.TestIdentityManager; import org.traccar.model.Event; import org.traccar.model.Position; public class IgnitionEventHandlerTest extends BaseTest { @Test - public void testIgnitionEventHandler() throws Exception { + public void testIgnitionEventHandler() { - IgnitionEventHandler ignitionEventHandler = new IgnitionEventHandler(); + IgnitionEventHandler ignitionEventHandler = new IgnitionEventHandler(new TestIdentityManager()); Position position = new Position(); position.set(Position.KEY_IGNITION, true); position.setValid(true); Map<Event, Position> events = ignitionEventHandler.analyzePosition(position); - assertEquals(events, null); + assertNull(events); } } |