main.misk.MiskTestingServiceModule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of misk-testing Show documentation
Show all versions of misk-testing Show documentation
Open source application container in Kotlin
package misk
import misk.concurrent.FakeSleeperModule
import misk.environment.FakeEnvVarModule
import misk.inject.KAbstractModule
import misk.random.FakeRandomModule
import misk.resources.TestingResourceLoaderModule
import misk.time.FakeClockModule
import misk.time.FakeTickerModule
import misk.tokens.FakeTokenGeneratorModule
/**
* [MiskTestingServiceModule] should be installed in unit testing environments.
*
* This should not contain application level fakes for testing. It includes a small, selective
* set of fake bindings to replace real bindings that cannot exist in a unit testing environment
* (e.g system env vars and filesystem dependencies).
*/
class MiskTestingServiceModule : KAbstractModule() {
override fun configure() {
install(TestingResourceLoaderModule())
install(FakeEnvVarModule())
install(FakeClockModule())
install(FakeSleeperModule())
install(FakeTickerModule())
install(FakeRandomModule())
install(FakeTokenGeneratorModule())
install(MiskCommonServiceModule())
}
}