diff options
author | kamaci <furkankamaci@gmail.com> | 2020-10-19 00:01:12 +0300 |
---|---|---|
committer | kamaci <furkankamaci@gmail.com> | 2020-10-19 00:01:12 +0300 |
commit | 3cd7831692b1725713e297372a0181e5ae614eb9 (patch) | |
tree | 46725cd3575e53ff9ff40b44236b34a323f804ac /src/test/java | |
parent | 98c2e3da5ea0670360078a3f278ddef7d9e39953 (diff) | |
download | traccar-server-3cd7831692b1725713e297372a0181e5ae614eb9.tar.gz traccar-server-3cd7831692b1725713e297372a0181e5ae614eb9.tar.bz2 traccar-server-3cd7831692b1725713e297372a0181e5ae614eb9.zip |
Anonymous types are replaced with lambda.
Diffstat (limited to 'src/test/java')
3 files changed, 4 insertions, 14 deletions
diff --git a/src/test/java/org/traccar/protocol/TeltonikaProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TeltonikaProtocolDecoderTest.java index 62c7f39f8..2f43733c4 100644 --- a/src/test/java/org/traccar/protocol/TeltonikaProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/TeltonikaProtocolDecoderTest.java @@ -3,7 +3,6 @@ package org.traccar.protocol; import org.junit.Ignore; import org.junit.Test; import org.traccar.ProtocolTest; -import org.traccar.model.Position; public class TeltonikaProtocolDecoderTest extends ProtocolTest { @@ -74,16 +73,16 @@ public class TeltonikaProtocolDecoderTest extends ProtocolTest { verifyPositions(decoder, binary( "000000000000003508010000014f8e016420002141bbaf0f4e96a7fffa0000120000000602010047030242669c92000002c7000000009100000000000100002df3")); - + verifyPositions(decoder, binary( "00000000000000A7080400000113fc208dff000f14f650209cca80006f00d60400040004030101150316030001460000015d0000000113fc17610b000f14ffe0209cc580006e00c00500010004030101150316010001460000015e0000000113fc284945000f150f00209cd200009501080400000004030101150016030001460000015d0000000113fc267c5b000f150a50209cccc0009300680400000004030101150016030001460000015b00040000")); - + verifyPositions(decoder, binary( "000000000000014708060000013e5a60a4cb003fa7b780fc424518004200000a000000090501010200b300b400f000034268a746011818000001c700000000000000013e5dc8ba28003fa7c080fc4246040001000005000000090501010200b300b400f001034268b44600ef18000001c700000000000000013e5dc90455003fa7b640fc424388003a0000070000f0090501010200b300b400f000034268dc4600f718000001c70000001d000000013e5dc9d368003fa7b800fc4244300049000004000000090501010200b300b400f001034267de46010718000001c700000000000000013e5dca311d003fa7b680fc4243cc00420000070000f0090501010200b300b400f0000342685346010b18000001c700000000000000013e5dcfafe9003fa7b600fc4242f0003d000008000000090501010200b300b400f0000342685246011918000001c700000000000600000275")); verifyPositions(decoder, binary( "000000000000002c08010000013eff8d6f9800173295002111f400008100ae0b0000000401010003090016432980422f7200000100007a5d")); - + verifyPositions(decoder, binary( "00000000000000c7070441bf9db00fff425adbd741ca6e1e009e1205070001030b160000601a02015e02000314006615000a160067010500000ce441bf9d920fff425adbb141ca6fc900a2b218070001030b160000601a02015e02000314006615000a160067010500000cc641bf9d740fff425adbee41ca739200b6c91e070001030b1f0000601a02015f02000314006615000a160066010500000ca841bf9cfc0fff425adba041ca70c100b93813070001030b1f0000601a02015f02000314002315000a160025010500000c3004000000")); diff --git a/src/test/java/org/traccar/protocol/UlbotechFrameDecoderTest.java b/src/test/java/org/traccar/protocol/UlbotechFrameDecoderTest.java index 01d63bfa3..31e748f27 100644 --- a/src/test/java/org/traccar/protocol/UlbotechFrameDecoderTest.java +++ b/src/test/java/org/traccar/protocol/UlbotechFrameDecoderTest.java @@ -3,8 +3,6 @@ package org.traccar.protocol; import org.junit.Test; import org.traccar.ProtocolTest; -import static org.junit.Assert.assertEquals; - public class UlbotechFrameDecoderTest extends ProtocolTest { @Test diff --git a/src/test/java/org/traccar/web/WebServerTest.java b/src/test/java/org/traccar/web/WebServerTest.java index 5a79fbac2..ba4124e44 100644 --- a/src/test/java/org/traccar/web/WebServerTest.java +++ b/src/test/java/org/traccar/web/WebServerTest.java @@ -6,8 +6,6 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; import java.lang.reflect.Proxy; public class WebServerTest { @@ -15,12 +13,7 @@ public class WebServerTest { @Test public void contextTest() throws NamingException { DataSource mockDataSource = (DataSource) Proxy.newProxyInstance(getClass().getClassLoader(), - new Class[] { DataSource.class }, new InvocationHandler() { - @Override - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - return null; - } - }); + new Class[]{DataSource.class}, (proxy, method, args) -> null); Context context = new InitialContext(); context.bind("java:/DefaultDS", mockDataSource); |