mockws
Mock implementation for the play.api.libs.ws.WS client. Usage:
val ws = MockWS { case ("GET", "/") => Action { Ok("index") } case ("GET", "/hi") => Action { Ok("world") } }
MockWS.Routes is a partial function. It is also possible to combine routes together:
val index = MockWS.Routes { case ("GET", "/") => Action { Ok("index") } } val hiWorld = MockWS.Routes { case ("GET", "/hi") => Action { Ok("world") } } val ws = MockWS(index orElse hiWorld)
routes defining the mock calls
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