Tests for RouteServer
This commit is contained in:
parent
15df3d392d
commit
fed171fd06
4 changed files with 147 additions and 5 deletions
|
|
@ -0,0 +1,27 @@
|
|||
package btools.server;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import btools.router.RoutingContext;
|
||||
import btools.server.request.ServerHandler;
|
||||
|
||||
public class RequestHandlerTest {
|
||||
@Test
|
||||
@Ignore("Parameters are currently handled by RouteServer, not RequestHandler")
|
||||
public void parseParameters() {
|
||||
HashMap<String, String> params = new HashMap<>();
|
||||
params.put("lonlats", "8.799297,49.565883|8.811764,49.563606");
|
||||
params.put("profile", "trekking");
|
||||
params.put("alternativeidx", "0");
|
||||
params.put("profile:test", "bar");
|
||||
ServerHandler serverHandler = new ServerHandler(null, params);
|
||||
RoutingContext routingContext = serverHandler.readRoutingContext();
|
||||
|
||||
Assert.assertEquals("trekking", routingContext.localFunction);
|
||||
Assert.assertEquals("bar", routingContext.keyValues.get("test"));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue