aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/BaseTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-20 20:59:39 +1300
committerGitHub <noreply@github.com>2016-10-20 20:59:39 +1300
commit1b903a5fb7d54201b81805ae549a8ece31300366 (patch)
tree8cdff4b3bf3a4ac2cb0582b4c7eb72773b6fd8a2 /test/org/traccar/BaseTest.java
parent4f7356cc1c6962f46ca522246d5b63dc06a2d268 (diff)
parentd997b79ec28ae8f2d8778ee388c342dbf40bc40e (diff)
downloadtrackermap-server-1b903a5fb7d54201b81805ae549a8ece31300366.tar.gz
trackermap-server-1b903a5fb7d54201b81805ae549a8ece31300366.tar.bz2
trackermap-server-1b903a5fb7d54201b81805ae549a8ece31300366.zip
Merge pull request #2461 from renaudallard/master
Log device uniqueId in filters logging
Diffstat (limited to 'test/org/traccar/BaseTest.java')
-rw-r--r--test/org/traccar/BaseTest.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/org/traccar/BaseTest.java b/test/org/traccar/BaseTest.java
new file mode 100644
index 000000000..0d74f50e5
--- /dev/null
+++ b/test/org/traccar/BaseTest.java
@@ -0,0 +1,43 @@
+package org.traccar;
+
+import org.traccar.database.IdentityManager;
+import org.traccar.model.Device;
+import org.traccar.model.Position;
+
+public class BaseTest {
+
+ 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;
+ }
+
+ });
+ }
+
+}