Route
mockws.Route
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
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait PartialFunction[(String, String), EssentialAction]trait ((String, String)) => EssentialActionclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Attributes
- Definition Classes
-
Function1
Attributes
- Returns
-
true if the route was called at least one time
Attributes
- Definition Classes
-
PartialFunction
Attributes
- Returns
-
the number of times the route was called
Inherited methods
Attributes
- Inherited from:
- PartialFunction
Attributes
- Definition Classes
-
PartialFunction -> Function1
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- Function1
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- PartialFunction
def orElse[A1 <: (String, String), B1 >: EssentialAction](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
Attributes
- Inherited from:
- PartialFunction
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- PartialFunction
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Function1 -> Any
- Inherited from:
- Function1
Attributes
- Inherited from:
- PartialFunction
In this article