Mock implementation for the play.api.libs.ws.WS client.
traces whether a route was called and how many times.
traces whether a route was called and how many times. Usage:
val route1 = Route { case (GET, "/route1") => Action { Ok("") } } val route2 = Route { case (GET, "/route2") => Action { Ok("") } } val ws = MockWS(route1 orElse route2) await(ws.url("/route1").get()) route1.called == true route2.called == false
Mock implementation for the play.api.libs.ws.WS client. Usage:
MockWS.Routes is a partial function. It is also possible to combine routes together:
routes defining the mock calls