withData

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.

Parameters

parameters

The data parameters to test with

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration

action

Test action to execute for each parameter


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.

Parameters

data

The iterable collection of test data

testConfig

Optional test configuration

action

Test action to execute for each data item


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.

Parameters

map

Map of test names to test data

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration

action

Test action to execute for each map value


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.

Parameters

nameFn

Function to generate test name from data

data

The iterable collection of test data

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration

action

Test action to execute for each data item


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.

Parameters

nameFn

Function to generate test name from data

arguments

The data parameters to test with

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration

action

Test action to execute for each parameter


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.

Parameters

data

The sequence of test data

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration

action

Test action to execute for each sequence item


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.

Parameters

nameFn

Function to generate test name from data

data

The sequence of test data

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration

action

Test action to execute for each sequence item


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.

Parameters

parameters

The data parameters to create suites for

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration


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.

Parameters

data

The iterable collection of test data

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration


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.

Parameters

map

Map of suite names to test data

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration


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.

Parameters

data

The sequence of test data

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration


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.

Parameters

nameFn

Function to generate suite name from data

data

The iterable collection of test data

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration


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.

Parameters

nameFn

Function to generate suite name from data

data

The sequence of test data

compact

If true, only a single test element is created and the class name of the data parameter is used as test name

maxLength

maximum length of test element name (not display name)

testConfig

Optional test configuration