Restructuring the CamelConfigSpec for fun and profit
This commit is contained in:
parent
cd0c96ff9c
commit
4441b03e07
1 changed files with 25 additions and 17 deletions
|
|
@ -11,30 +11,38 @@ import java.util.concurrent.TimeUnit._
|
|||
|
||||
class CamelConfigSpec extends WordSpec with MustMatchers {
|
||||
|
||||
"CamelConfigSpec" must {
|
||||
"have correct config" in {
|
||||
val (settings, config) = {
|
||||
val system = ActorSystem("CamelConfigSpec")
|
||||
try {
|
||||
val settings = CamelExtension(system).settings
|
||||
|
||||
val config = system.settings.config
|
||||
|
||||
val result = (CamelExtension(system).settings, system.settings.config)
|
||||
system.shutdown()
|
||||
result
|
||||
}
|
||||
"CamelConfigSpec" must {
|
||||
"have correct activationTimeout config" in {
|
||||
settings.activationTimeout must be === Duration(config.getMilliseconds("akka.camel.consumer.activation-timeout"), MILLISECONDS)
|
||||
}
|
||||
|
||||
"have correct autoAck config" in {
|
||||
settings.autoAck must be === config.getBoolean("akka.camel.consumer.auto-ack")
|
||||
}
|
||||
|
||||
"have correct replyTimeout config" in {
|
||||
settings.replyTimeout must be === Duration(config.getMilliseconds("akka.camel.consumer.reply-timeout"), MILLISECONDS)
|
||||
}
|
||||
|
||||
"have correct streamingCache config" in {
|
||||
settings.streamingCache must be === config.getBoolean("akka.camel.streamingCache")
|
||||
}
|
||||
|
||||
"have correct jmxStatistics config" in {
|
||||
settings.jmxStatistics must be === config.getBoolean("akka.camel.jmx")
|
||||
}
|
||||
|
||||
"have correct body conversions config" in {
|
||||
val conversions = config.getConfig("akka.camel.conversions")
|
||||
|
||||
conversions.getString("file") must be === "java.io.InputStream"
|
||||
conversions.entrySet.size must be === 1
|
||||
|
||||
} finally system.shutdown()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue