Dependencies¶
All the dependencies are pluggable. Stove supports:
and more to come.
There is a structure for a dependency to be pluggable in the Stove testing system. Every system connects or starts its
life with with
notation. For example, withCouchbase
, withHttpClient
, withKafka
... That means, if you want plug
a physical dependency to your system look for a method that starts with with
keyword. Having said that, when you write
your own system that Stove does not have, you should use this structure, too.
Every system has the SystemOptions¶
Every system accepts an options parameter that implements SystemOptions
. For example;
KafkaSystemOptions
implements SystemOptions
interface.
If a system exposes its run-time
configurations then it implements ConfiguresExposedConfiguration
. This is applicable for
most of the cases. This mechanism allows you to configure your application (system under test) args before it starts.
TestSystem()
.withKafka(
KafkaSystemOptions(configureExposedConfiguration = { cfg ->
listOf("kafka.bootstrapServers=${cfg.boostrapServers}")
})
)
main(args)
function.