|
Play Framework/Scala example source code file (EhCacheSpec.scala)
The EhCacheSpec.scala Play Framework example source code
package play.api.cache
import play.api.test.{WithApplication, PlaySpecification}
import play.api.test.FakeApplication
import play.api.Play.current
class EhCacheSpec extends PlaySpecification {
"EhCachePlugin" should {
"load default configuration" in new WithApplication() {
current.plugin[EhCachePlugin].get.configResource must_== current.classloader.getResource("ehcache-default.xml")
}
"load alternate configuration" in new WithApplication(
FakeApplication(additionalConfiguration = Map("ehcache.configResource" -> "ehcache-alternate.xml"))
) {
current.plugin[EhCachePlugin].get.configResource must_== current.classloader.getResource("ehcache-alternate.xml")
}
}
}
Other Play Framework source code examplesHere is a short list of links related to this Play Framework EhCacheSpec.scala source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.