From 5c084a0b2961dbfc3cd85a386fefe0b0da6c0c44 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 9 Mar 2019 17:04:08 -0800 Subject: Refactor ignition event handler --- test/org/traccar/handler/events/IgnitionEventHandlerTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/org/traccar') 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 events = ignitionEventHandler.analyzePosition(position); - assertEquals(events, null); + assertNull(events); } } -- cgit v1.2.3