withData

fun <Data> TestSuite.withData(vararg parameters: Data, testConfig: TestConfig = TestConfig, action: suspend (Data) -> Unit)

Executes a test for each provided data parameter.

Parameters

parameters

The data parameters to test with

testConfig

Optional test configuration

action

Test action to execute for each parameter


fun <Data> TestSuite.withData(data: Iterable<Data>, testConfig: TestConfig = TestConfig, action: suspend (Data) -> Unit)

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

Parameters

data

The iterable collection of test data

testConfig

Optional test configuration

action

Test action to execute for each data item


fun <Data> TestSuite.withData(map: Map<String, Data>, testConfig: TestConfig = TestConfig, action: suspend (Data) -> Unit)

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

Parameters

map

Map of test names to test data

testConfig

Optional test configuration

action

Test action to execute for each map value


fun <Data> TestSuite.withData(nameFn: (Data) -> String, data: Iterable<Data>, testConfig: TestConfig = TestConfig, action: suspend (Data) -> Unit)

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

Parameters

nameFn

Function to generate test name from data

data

The iterable collection of test data

testConfig

Optional test configuration

action

Test action to execute for each data item


fun <Data> TestSuite.withData(nameFn: (Data) -> String, vararg arguments: Data, testConfig: TestConfig = TestConfig, action: suspend (Data) -> Unit)

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

Parameters

nameFn

Function to generate test name from data

arguments

The data parameters to test with

testConfig

Optional test configuration

action

Test action to execute for each parameter


fun <Data> TestSuite.withData(data: Sequence<Data>, testConfig: TestConfig = TestConfig, action: suspend (Data) -> Unit)

Executes a test for each item in the provided sequence.

Parameters

data

The sequence of test data

testConfig

Optional test configuration

action

Test action to execute for each sequence item


fun <Data> TestSuite.withData(nameFn: (Data) -> String, data: Sequence<Data>, testConfig: TestConfig = TestConfig, action: suspend (Data) -> Unit)

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

Parameters

nameFn

Function to generate test name from data

data

The sequence of test data

testConfig

Optional test configuration

action

Test action to execute for each sequence item


fun <Data> TestSuite.withData(vararg parameters: Data, testConfig: TestConfig = TestConfig): ConfiguredDataTestScope<Data>

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

Parameters

parameters

The data parameters to create suites for

testConfig

Optional test configuration


fun <Data> TestSuite.withData(data: Iterable<Data>, testConfig: TestConfig = TestConfig): ConfiguredDataTestScope<Data>

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

Parameters

data

The iterable collection of test data

testConfig

Optional test configuration


fun <Data> TestSuite.withData(map: Map<String, Data>, testConfig: TestConfig = TestConfig): ConfiguredMapDataTestScope<Data>

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

Parameters

map

Map of suite names to test data

testConfig

Optional test configuration


fun <Data> TestSuite.withData(data: Sequence<Data>, testConfig: TestConfig = TestConfig): ConfiguredDataTestScope<Data>

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

Parameters

data

The sequence of test data

testConfig

Optional test configuration


fun <Data> TestSuite.withData(nameFn: (Data) -> String, data: Iterable<Data>, 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.

Parameters

nameFn

Function to generate suite name from data

data

The iterable collection of test data

testConfig

Optional test configuration


fun <Data> TestSuite.withData(nameFn: (Data) -> String, data: Sequence<Data>, 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.

Parameters

nameFn

Function to generate suite name from data

data

The sequence of test data

testConfig

Optional test configuration