Package-level declarations

Types

Link copied to clipboard
data class ConfiguredDataTestScope<Data>(compactName: String?, maxLength: Int = DataTest.maxLength, val testSuite: TestSuite, val map: Sequence<Pair<String, Data>>, val testConfig: TestConfig = TestConfig)
Link copied to clipboard
object DataTest

Global knobs to tweak the behavior of DataTest Addon

Functions

Link copied to clipboard
inline fun <Data> TestSuite.withData(vararg parameters: Data, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig): ConfiguredDataTestScope<Data>

Creates a configured test suite scope to generate test suites for each provided data parameter.

inline fun <Data> TestSuite.withData(data: Iterable<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig): ConfiguredDataTestScope<Data>

Creates a configured test suite scope to generate test suites for each item in the provided iterable data.

inline fun <Data> TestSuite.withData(map: Map<String, Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig): ConfiguredDataTestScope<Data>

Creates a configured test suite scope to generate test suites for each entry in the provided map. Uses map keys as suite names.

inline fun <Data> TestSuite.withData(data: Sequence<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig): ConfiguredDataTestScope<Data>

Creates a configured test suite scope to generate test suites for each item in the provided sequence.

inline fun <Data> TestSuite.withData(vararg parameters: Data, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, crossinline action: suspend (Data) -> Unit)

Executes a test for each provided data parameter.

inline fun <Data> TestSuite.withData(crossinline nameFn: (Data) -> String, data: Iterable<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig): ConfiguredDataTestScope<Data>

Creates a configured test suite scope to generate test suites for each item in the provided iterable data. Uses provided function to generate suite names.

inline fun <Data> TestSuite.withData(crossinline nameFn: (Data) -> String, data: Sequence<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig): ConfiguredDataTestScope<Data>

Creates a configured test suite scope to generate test suites for each item in the provided sequence. Uses provided function to generate suite names.

inline fun <Data> TestSuite.withData(data: Iterable<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, crossinline action: suspend (Data) -> Unit)

Executes a test for each item in the provided iterable data.

inline fun <Data> TestSuite.withData(map: Map<String, Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, crossinline action: suspend (Data) -> Unit)

Executes a test for each entry in the provided map. Uses map keys as test names.

inline fun <Data> TestSuite.withData(data: Sequence<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, crossinline action: suspend (Data) -> Unit)

Executes a test for each item in the provided sequence.

inline fun <Data> TestSuite.withData(crossinline nameFn: (Data) -> String, vararg arguments: Data, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, crossinline action: suspend (Data) -> Unit)

Executes a test for each provided data parameter. Uses provided function to generate test names.

inline fun <Data> TestSuite.withData(crossinline nameFn: (Data) -> String, data: Iterable<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, crossinline action: suspend (Data) -> Unit)

Executes a test for each item in the provided iterable data. Uses provided function to generate test names.

inline fun <Data> TestSuite.withData(crossinline nameFn: (Data) -> String, data: Sequence<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, crossinline action: suspend (Data) -> Unit)

Executes a test for each item in the provided sequence. Uses provided function to generate test names.

Link copied to clipboard
inline fun <Data> TestSuite.withDataSuites(vararg parameters: Data, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, noinline action: TestSuite.(Data) -> Unit)

Creates a test suite for each provided data parameter.

inline fun <Data> TestSuite.withDataSuites(crossinline nameFn: (Data) -> String, vararg arguments: Data, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig): ConfiguredDataTestScope<Data>

Creates a configured test suite scope to generate test suites for each provided data parameter. Uses provided function to generate suite names.

inline fun <Data> TestSuite.withDataSuites(data: Iterable<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, noinline action: TestSuite.(Data) -> Unit)

Creates a test suite for each item in the provided iterable data.

inline fun <Data> TestSuite.withDataSuites(map: Map<String, Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, noinline action: TestSuite.(Data) -> Unit)

Creates a test suite for each entry in the provided map. Uses map keys as suite names.

inline fun <Data> TestSuite.withDataSuites(data: Sequence<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, noinline action: TestSuite.(Data) -> Unit)

Creates a test suite for each item in the provided sequence.

inline fun <Data> TestSuite.withDataSuites(nameFn: (Data) -> String, vararg arguments: Data, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, noinline action: TestSuite.(Data) -> Unit)

Creates a test suite for each provided data parameter. Uses provided function to generate suite names.

inline fun <Data> TestSuite.withDataSuites(nameFn: (Data) -> String, data: Iterable<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, noinline action: TestSuite.(Data) -> Unit)

Creates a test suite for each item in the provided iterable data. Uses provided function to generate suite names.

inline fun <Data> TestSuite.withDataSuites(crossinline nameFn: (Data) -> String, data: Sequence<Data>, compact: Boolean = DataTest.compactByDefault, maxLength: Int = DataTest.maxLength, testConfig: TestConfig = TestConfig, noinline action: TestSuite.(Data) -> Unit)

Creates a test suite for each item in the provided sequence. Uses provided function to generate suite names.