RunnerTest

abstract class RunnerTest : HasTestEnvironmentFactory<RunnerTestEnvironmentFactory> , TrimmedAsserts(source)

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
open val logger: () -> ReportingLogger
Link copied to clipboard
open val ruleFilter: () -> RuleFilter
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun findingFactory(fixable: List<Finding> = emptyList(), sorts: List<Finding> = emptyList(), reports: List<Finding> = emptyList()): FindingFactory<*>
Link copied to clipboard
fun RunnerTestEnvironment.run(autoCorrect: Boolean = true, strictResolution: Boolean = false, findingFactory: FindingFactory<out Finding> = this.findingFactory, settings: ModuleCheckSettings = this.settings, logger: McLogger = this.logger, projectProvider: ProjectProvider = this.projectProvider, findingResultFactory: FindingResultFactory = RealFindingResultFactory(), terminal: Terminal = TerminalModule.provideTerminal(), reportFactory: ReportFactory = ReportFactory(terminal), checkstyleReporter: CheckstyleReporter = CheckstyleReporter(), graphvizFileWriter: GraphvizFileWriter = GraphvizFileWriter( settings = settings, graphvizFactory = GraphvizFactory(projectProvider.toTypeSafeProjectPathResolver()) ), dispatcherProvider: DispatcherProvider = DispatcherProvider(), rules: DaggerList<ModuleCheckRule<*>> = this.rules): Result<Unit>
Link copied to clipboard
open infix fun <T, U : T> T.shouldBe(expected: U?)
open infix fun String.shouldBe(expected: String)
open infix fun Sequence<*>.shouldBe(expected: List<*>)
Link copied to clipboard
open infix fun String.shouldBeNoTrimIndent(expected: String)
Link copied to clipboard
open infix fun File.shouldHaveText(expected: String)
Link copied to clipboard
Link copied to clipboard
open fun <ENV : TestEnvironment> HasTestEnvironmentFactory<NoParamTestEnvironmentFactory<ENV>>.test(names: List<String>, testLocation: TestLocation, testAction: suspend ENV.() -> Unit)
open fun <ENV : TestEnvironment> test(testEnvironmentFactory: NoParamTestEnvironmentFactory<ENV>, names: List<String>, testLocation: TestLocation, testAction: suspend ENV.() -> Unit)
open fun <PARAM, ENV : TestEnvironment> HasTestEnvironmentFactory<ParamTestEnvironmentFactory<PARAM, ENV>>.test(param: PARAM, names: List<String>, testLocation: TestLocation, testAction: suspend ENV.() -> Unit)
open fun <PARAM, ENV : TestEnvironment> test(param: PARAM, testEnvironmentFactory: TestEnvironmentFactory<PARAM, ENV>, names: List<String>, testLocation: TestLocation, testAction: suspend ENV.() -> Unit)

fun test(testLocation: TestLocation = TestLocation.get(), testAction: suspend RunnerTestEnvironment.() -> Unit)

shorthand for executing a test in a hermetic TestEnvironment but without any kase parameters

Link copied to clipboard
open fun <T, U : T> T.trimmedShouldBe(expected: U?, vararg excludeFromStack: KClass<*>)