public static interface ServiceTest.Setup
Modifier and Type | Method and Description |
---|---|
boolean |
cassandra()
Whether Cassandra is enabled.
|
boolean |
cluster()
Whether clustering is enabled.
|
Function<GuiceApplicationBuilder,GuiceApplicationBuilder> |
configureBuilder()
The builder configuration function
|
ServiceTest.Setup |
configureBuilder(Function<GuiceApplicationBuilder,GuiceApplicationBuilder> configureBuilder)
Configure the builder.
|
boolean |
jdbc()
Whether JDBC 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<GuiceApplicationBuilder,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.
|
boolean cassandra()
boolean cluster()
ServiceTest.Setup configureBuilder(Function<GuiceApplicationBuilder,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<GuiceApplicationBuilder,GuiceApplicationBuilder> configureBuilder()
boolean jdbc()
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<GuiceApplicationBuilder,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)