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

main.misk.testing.MiskTest.kt Maven / Gradle / Ivy

There is a newer version: 2024.09.17.200749-4708422
Show newest version
package misk.testing

import com.google.inject.Module
import com.google.inject.util.Modules
import org.junit.jupiter.api.extension.ExtendWith

@Target(AnnotationTarget.CLASS)
@ExtendWith(MiskTestExtension::class)

/**
 * Annotate your test classes with `@MiskTest` to have fields annotated with `@Inject` initialized.
 * Provide modules to be installed by annotating a [Module] field in your test class with
 * [MiskTestModule]. This can be a compound module, composed using [Modules.combine].
 *
 * Configure test callbacks with Guice multibindings. Register instances by calling `multibind()`
 * in a `KAbstractModule`:
 *
 * ```
 * multibind().to()
 * multibind().to()
 * ```
 */
annotation class MiskTest(val startService: Boolean = false)

@Target(AnnotationTarget.FIELD)
annotation class MiskTestModule

@Target(AnnotationTarget.FIELD)
annotation class MiskExternalDependency




© 2015 - 2024 Weber Informatics LLC | Privacy Policy