public static class ServiceTest.TestServer extends Object
Constructor and Description |
---|
TestServer(int port,
Application app,
play.core.server.Server server) |
Modifier and Type | Method and Description |
---|---|
Application |
app() |
<S extends Service> |
client(Class<S> serviceClass)
Get the service client for a service.
|
Injector |
injector()
The Guice injector that can be used for retrieving anything
that has been bound to Guice.
|
akka.stream.Materializer |
materializer()
Stream materializer.
|
int |
port() |
void |
stop()
If you use
startServer you must also stop the server with
this method when the test is finished. |
akka.actor.ActorSystem |
system()
Current Akka
ActorSystem . |
public TestServer(int port, Application app, play.core.server.Server server)
public int port()
public Application app()
public <S extends Service> S client(Class<S> serviceClass)
public akka.stream.Materializer materializer()
public akka.actor.ActorSystem system()
ActorSystem
. Useful for Akka Streams TestKit.public Injector injector()
public void stop()
startServer
you must also stop the server with
this method when the test is finished. That is handled automatically
by withServer
.