public static class ServiceTest.TestServer extends Object
Constructor and Description |
---|
TestServer(int port,
play.Application app,
play.core.server.Server server,
Optional<SSLContext> clientSslContext) |
Modifier and Type | Method and Description |
---|---|
play.Application |
app() |
<S extends Service> |
client(Class<S> serviceClass)
Get the service client for a service.
|
Optional<SSLContext> |
clientSslContext() |
play.inject.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() |
Optional<Integer> |
portSsl() |
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, play.Application app, play.core.server.Server server, Optional<SSLContext> clientSslContext)
public int port()
public play.Application app()
public Optional<SSLContext> clientSslContext()
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 play.inject.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
.