TestEnvironment

open class TestEnvironment(names: List<String>, testLocation: TestLocation = TestLocation.get()) : TestEnvironment, TrimmedAsserts(source)

Constructors

Link copied to clipboard
constructor(names: List<String>, testLocation: TestLocation = TestLocation.get())

Properties

Link copied to clipboard
open override val workingDir: File

Functions

Link copied to clipboard

Cleans the provided string in the context of the TestEnvironment's working directory.

Link copied to clipboard
open override fun String.cleanOutput(): String
Link copied to clipboard
open infix fun <T, U : T> T.shouldBe(expected: U?)

Delegates to Kotest's shouldBe, but removes all the noise at the beginning of a stacktrace, like:

open infix fun String.shouldBe(expected: String)

A special String-only version of shouldBe which calls trimIndent first.

open infix fun Sequence<*>.shouldBe(expected: List<*>)

Treat sequences like lists when asserting.

Link copied to clipboard
open infix fun String.shouldBeNoTrimIndent(expected: String)

An alternative to the overloaded String-only shouldBe, since the overloaded version automatically applies trimIndent.

Link copied to clipboard
open infix override fun File.shouldHaveText(expected: String)

Asserts that the provided File has the expected text after reading it and using relative paths.

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

Delegates to Kotest's shouldBe, but removes all the noise at the beginning of a stacktrace, like:

Link copied to clipboard

replace absolute paths with relative ones