assertEmpty

fun <E : KoBaseProvider> List<E?>.assertEmpty(strict: Boolean = false, additionalMessage: String? = null, testName: String? = null)

Asserts that the list is empty.

Parameters

strict

A flag indicating whether strict checking should be enabled. If set to true, the assertion will pass if the list is empty or contains only null values. If set to false, null values are treated as regular elements and the assertion will pass if the list is completely empty. By default, false.

additionalMessage

An optional message to provide additional context when the assertion fails. This message will be included in the assertion error if the assertion fails.

testName

An optional test name recommended for Kotest tests. By default, test name is derived from JUnit method name, however for Kotest framework it must be manually specified to be displayed in error messages and enable suppression.


fun <E : KoBaseProvider> Sequence<E?>.assertEmpty(strict: Boolean = false, additionalMessage: String? = null, testName: String? = null)

Asserts that the sequence is empty.

Parameters

strict

A flag indicating whether strict checking should be enabled. If set to true, the assertion will pass if the sequence is empty or contains only null values. If set to false, null values are treated as regular elements and the assertion will pass if the sequence is completely empty. By default, false.

additionalMessage

An optional message to provide additional context when the assertion fails. This message will be included in the assertion error if the assertion fails.

testName

An optional test name recommended for Kotest tests. By default, test name is derived from JUnit method name, however for Kotest framework it must be manually specified to be displayed in error messages and enable suppression.