Package guru.zoroark.tegral.di.test.check

Types

Link copied to clipboard
enum DependencyKind : Enum<DependencyKind>

A "kind" of dependency detected by DependencyTrackingInjectionEnvironment.

Link copied to clipboard

Fake environment that tracks dependencies on the instantiation of components.

Link copied to clipboard
data class IdentifierDependencies(val kind: DependencyKind, val dependencies: List<Identifier<*>>)

The dependencies for an identifier, with the kind of dependency "towards" those dependencies.

Link copied to clipboard
class NoUnusedCheck(ignoredValues: Set<Identifier<*>>) : TegralDiCheck

Checks that all the components within modules are injected somewhere, except for the specified in the set passed as a parameter.

Link copied to clipboard
class NoUnusedCheckDsl

DSL receiver for creating a NoUnusedCheck with excluded components. Use the exclude functions to exclude components by their identifiers.

Link copied to clipboard
fun interface TegralDiCheck

An individual Tegral DI check that can be ran.

Link copied to clipboard
class TegralDiCheckDsl

DSL receiver class for the Tegral DI check DSL.

Link copied to clipboard
class TegralDiCheckException(message: String) : TegralDiException

Exception type for check failures (i.e. when a check is not met).

Functions

Link copied to clipboard
fun TegralDiCheckDsl.complete()

Checks that the modules are complete and that all dependencies and injections can be properly resolved.

Link copied to clipboard
inline fun <T : Any> NoUnusedCheckDsl.exclude(qualifier: Qualifier = EmptyQualifier)

Excludes an identifier built from the generic type parameter and the given qualifier, or EmptyQualifier if no qualifier is provided.

fun NoUnusedCheckDsl.exclude(kclass: KClass<*>, qualifier: Qualifier = EmptyQualifier)

Excludes an identifier built from the given class and the given qualifier, or EmptyQualifier if no qualifier is provided.

Link copied to clipboard
fun TegralDiCheckDsl.modules(vararg modules: InjectableModule)

Adds the given modules to this Tegral DI check instance.

Link copied to clipboard
fun TegralDiCheckDsl.noCycle()

Checks that no cyclic dependencies are present within the modules.

Link copied to clipboard
inline fun TegralDiCheckDsl.noUnused(block: NoUnusedCheckDsl.() -> Unit = {})

Creates a NoUnusedCheck.

Link copied to clipboard
fun TegralDiCheckDsl.safeInjection()

Check that verifies no injection is actually performed during the instantiation of components.

Link copied to clipboard
fun tegralDiCheck(block: TegralDiCheckDsl.() -> Unit)

DSL for checking your Tegral DI modules.