winter-testing / io.jentz.winter.testing / WinterTestSession / Builder

Builder

class Builder

Constructors

<init>

Builder()

Properties

application

var application: WinterApplication

Functions

autoCloseAllGraphs

fun autoCloseAllGraphs(): Unit

Auto-close all graphs that where opened after start was called when stop is called.

autoCloseTestGraph

fun autoCloseTestGraph(): Unit

Auto-close the test graph when stop is called.

autoCloseTestGraphAndAncestors

fun autoCloseTestGraphAndAncestors(): Unit

Auto-close the test graph and all its ancestors when stop is called.

bindAllMocks

fun bindAllMocks(qualifier: Any = ApplicationScope::class): Unit

Automatically bind all mocks found in the test instances to the graph with given component qualifier.

build

fun build(testInstances: List<Any>): WinterTestSession

extend

fun extend(qualifier: Any = ApplicationScope::class, block: ComponentBuilderBlock): Unit

Extend the graph with the component qualifier qualifier with the given block.

onGraphClose

fun onGraphClose(qualifier: Any = ApplicationScope::class, callback: OnGraphCloseCallback): Unit

Add callback that gets invoked when a graph with the component qualifier gets closed.

onGraphInitialized

fun onGraphInitialized(qualifier: Any = ApplicationScope::class, callback: OnGraphInitializedCallback): Unit

Add callback that gets invoked when a graph with the component qualifier got created.

testGraph

fun testGraph(qualifier: Any): Unit

Use the graph with component qualifier as test graph.