aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-05 21:58:26 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-05 21:58:26 +1200
commit1d04cfbd052946ac8eb00cd4c8045a31d4d75da3 (patch)
tree84b0705737639860c6655dd3f479d2d913a5f7a8 /test/org/traccar
parent6a3d70c2e591edbb34af15dcaa45a9a7114c1dd3 (diff)
downloadtrackermap-server-1d04cfbd052946ac8eb00cd4c8045a31d4d75da3.tar.gz
trackermap-server-1d04cfbd052946ac8eb00cd4c8045a31d4d75da3.tar.bz2
trackermap-server-1d04cfbd052946ac8eb00cd4c8045a31d4d75da3.zip
Update OsmAnd protocol
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/ProtocolTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java
index 831a10c51..e6a718d22 100644
--- a/test/org/traccar/ProtocolTest.java
+++ b/test/org/traccar/ProtocolTest.java
@@ -3,6 +3,9 @@ package org.traccar;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
+import io.netty.handler.codec.http.DefaultFullHttpRequest;
+import io.netty.handler.codec.http.HttpMethod;
+import io.netty.handler.codec.http.HttpVersion;
import org.traccar.helper.DataConverter;
import org.traccar.model.CellTower;
import org.traccar.model.Command;
@@ -59,20 +62,17 @@ public class ProtocolTest extends BaseTest {
return Unpooled.copiedBuffer(concatenateStrings(data), StandardCharsets.ISO_8859_1);
}
- // TODO handle HTTP methods
- /*protected DefaultHttpRequest request(String url) {
+ protected DefaultFullHttpRequest request(String url) {
return request(HttpMethod.GET, url);
}
- protected DefaultHttpRequest request(HttpMethod method, String url) {
- return new DefaultHttpRequest(HttpVersion.HTTP_1_1, method, url);
+ protected DefaultFullHttpRequest request(HttpMethod method, String url) {
+ return new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, method, url);
}
- protected DefaultHttpRequest request(HttpMethod method, String url, ByteBuf data) {
- DefaultHttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, method, url);
- request.setContent(data);
- return request;
- }*/
+ protected DefaultFullHttpRequest request(HttpMethod method, String url, ByteBuf data) {
+ return new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, method, url, data);
+ }
protected void verifyNotNull(BaseProtocolDecoder decoder, Object object) throws Exception {
assertNotNull(decoder.decode(null, null, object));