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.
|
ServiceTest.Setup |
withCassandra(boolean enabled)
Enable or disable Cassandra.
|
ServiceTest.Setup |
withCluster(boolean enabled)
Enable clustering.
|
ServiceTest.Setup |
withConfigureBuilder(Function<GuiceApplicationBuilder,GuiceApplicationBuilder> configureBuilder)
Deprecated.
Use configureBuilder instead. Since 1.2.0.
|
ServiceTest.Setup |
withPersistence(boolean enabled)
Deprecated.
Use withCassandra instead. Since 1.2.0.
|
ServiceTest.Setup withPersistence(boolean enabled)
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 withConfigureBuilder(Function<GuiceApplicationBuilder,GuiceApplicationBuilder> configureBuilder)
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.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.boolean cassandra()
boolean cluster()
Function<GuiceApplicationBuilder,GuiceApplicationBuilder> configureBuilder()