All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.misk.MiskTestingServiceModule.kt Maven / Gradle / Ivy

There is a newer version: 2024.09.17.200749-4708422
Show newest version
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())
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy