assertFalse

fun <E : KoBaseProvider> E?.assertFalse(strict: Boolean = false, additionalMessage: String? = null, testName: String? = null, function: (E) -> Boolean?)

Asserts that element not match the specified predicate.

Parameters

strict

A flag indicating whether strict checking should be enabled. If set to true, an assertion error will be thrown if assert is called on null. If set to false, the method will pass successfully when called on null. 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.

function

The predicate function that takes an element of type E and returns a Boolean value. If the function returns true, the element is considered invalid; otherwise, it's considered valid.


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

Asserts that no elements in the list match the specified predicate.

Parameters

strict

A flag indicating whether strict checking should be enabled. If set to true, an assertion error will be thrown if the list is empty or contains only null values. If set to false, the method will pass successfully when called on an empty list. 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.

function

The predicate function that takes an element of type E and returns a Boolean value. If the function returns true, the element is considered invalid; otherwise, it's considered valid.


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

Asserts that no elements in the sequence match the specified predicate.

Parameters

strict

A flag indicating whether strict checking should be enabled. If set to true, an assertion error will be thrown if the sequence is empty or contains only null values. If set to false, the method will pass successfully when called on an empty sequence. 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.

function

The predicate function that takes an element of type E and returns a Boolean value. If the function returns true, the element is considered invalid; otherwise, it's considered valid.