some requested fixes
Этот коммит содержится в:
@@ -22,8 +22,18 @@ public class ProtocolFormatterTest {
|
||||
Position position = new Position("123456789012345", new Location("gps"), 0);
|
||||
position.setTime(new Date(0));
|
||||
|
||||
String url = ProtocolFormatter.formatRequest("http://localhost:5055/path", position);
|
||||
assertEquals("http://localhost:5055/path?id=123456789012345×tamp=0&lat=0.0&lon=0.0&speed=0.0&bearing=0.0&altitude=0.0&batt=0.0", url);
|
||||
String url = ProtocolFormatter.formatRequest("http://localhost", position);
|
||||
assertEquals("http://localhost:5055?id=123456789012345×tamp=0&lat=0.0&lon=0.0&speed=0.0&bearing=0.0&altitude=0.0&batt=0.0", url);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFormatPathPortRequest() throws Exception {
|
||||
|
||||
Position position = new Position("123456789012345", new Location("gps"), 0);
|
||||
position.setTime(new Date(0));
|
||||
|
||||
String url = ProtocolFormatter.formatRequest("http://localhost:8888/path", position);
|
||||
assertEquals("http://localhost:8888/path?id=123456789012345×tamp=0&lat=0.0&lon=0.0&speed=0.0&bearing=0.0&altitude=0.0&batt=0.0", url);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Ссылка в новой задаче
Block a user