public static interface ServiceTest.Setup
Modifier and Type | Method and Description |
---|---|
boolean |
cassandra()
Whether Cassandra is enabled.
|
boolean |
cluster()
Whether clustering is enabled.
|
Function<play.inject.guice.GuiceApplicationBuilder,play.inject.guice.GuiceApplicationBuilder> |
configureBuilder()
The builder configuration function
|
ServiceTest.Setup |
configureBuilder(Function<play.inject.guice.GuiceApplicationBuilder,play.inject.guice.GuiceApplicationBuilder> configureBuilder)
Configure the builder.
|
boolean |
jdbc()
Whether JDBC is enabled.
|
boolean |
ssl()
Whether HTTPS is enabled.
|
ServiceTest.Setup |
withCassandra()
Enable Cassandra.
|
ServiceTest.Setup |
withCassandra(boolean enabled)
Enable or disable Cassandra.
|
ServiceTest.Setup |
withCluster()
Enable clustering.
|
ServiceTest.Setup |
withCluster(boolean enabled)
Enable or disable clustering.
|
ServiceTest.Setup |
withConfigureBuilder(Function<play.inject.guice.GuiceApplicationBuilder,play.inject.guice.GuiceApplicationBuilder> configureBuilder)
Deprecated.
Use configureBuilder instead. Since 1.2.0.
|
ServiceTest.Setup |
withJdbc()
Enable JDBC.
|
ServiceTest.Setup |
withJdbc(boolean enabled)
Enable or disable JDBC.
|
ServiceTest.Setup |
withPersistence(boolean enabled)
Deprecated.
Use withCassandra instead. Since 1.2.0.
|
ServiceTest.Setup |
withSsl()
Enable the SSL port.
|
ServiceTest.Setup |
withSsl(boolean enabled)
Enable or disable the SSL port.
|
boolean cassandra()
boolean cluster()
ServiceTest.Setup configureBuilder(Function<play.inject.guice.GuiceApplicationBuilder,play.inject.guice.GuiceApplicationBuilder> configureBuilder)
Allows a function to be supplied to configure the Play Guice application builder. This allows components to be mocked, modules to be enabled/disabled, and custom configuration to be supplied.
configureBuilder
- The builder configuration function.Function<play.inject.guice.GuiceApplicationBuilder,play.inject.guice.GuiceApplicationBuilder> configureBuilder()
boolean jdbc()
boolean ssl()
ServiceTest.Setup withCassandra(boolean enabled)
If enabled, this will start an embedded Cassandra server before the tests start, and shut it down afterwards. It will also configure Lagom to use the embedded Cassandra server. Enabling Cassandra will also enable the cluster.
enabled
- True if Cassandra should be enabled, or false if disabled.ServiceTest.Setup withCassandra()
If enabled, this will start an embedded Cassandra server before the tests start, and shut it down afterwards. It will also configure Lagom to use the embedded Cassandra server. Enabling Cassandra will also enable the cluster.
ServiceTest.Setup withCluster(boolean enabled)
Disabling this will automatically disable any persistence plugins, since persistence requires clustering.
enabled
- True if clustering should be enabled, or false if disabled.ServiceTest.Setup withCluster()
Disabling this will automatically disable any persistence plugins, since persistence requires clustering.
ServiceTest.Setup withConfigureBuilder(Function<play.inject.guice.GuiceApplicationBuilder,play.inject.guice.GuiceApplicationBuilder> configureBuilder)
ServiceTest.Setup withJdbc(boolean enabled)
Enabling JDBC will also enable the cluster.
enabled
- True if JDBC should be enabled, or false if disabled.ServiceTest.Setup withJdbc()
Enabling JDBC will also enable the cluster.
ServiceTest.Setup withPersistence(boolean enabled)
ServiceTest.Setup withSsl(boolean enabled)
enabled
- True if the server should bind an HTTP+TLS port, or false if only HTTP should be bound.ServiceTest.Setup withSsl()