assert Empty
Asserts that the list is empty.
Parameters
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.
An optional message to provide additional context when the assertion fails. This message will be included in the assertion error if the assertion fails.
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.
Asserts that the sequence is empty.
Parameters
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.
An optional message to provide additional context when the assertion fails. This message will be included in the assertion error if the assertion fails.
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.