assertFalse
open fun <E : KoBaseProvider> List<E?>.assertFalse(strict: Boolean = false, additionalMessage: String? = null, testName: String? = null, function: (E) -> Boolean?): Nothing(source)
Deprecated (with error)
katachi cannot see which declarations assertFalse rejected. Use must / mustNot / mustBeEmpty.
Replace with
mustNot(function)Content copied to clipboard
Konsist's own assertion over a list. Not usable here — see assertTrue.
Example 1: what to write instead
classes().assertFalse { it.hasPublicOrDefaultModifier } // compile error
classes().mustNot { it.hasPublicOrDefaultModifier } // okContent copied to clipboard
open fun <E : KoBaseProvider> E?.assertFalse(strict: Boolean = false, additionalMessage: String? = null, testName: String? = null, function: (E) -> Boolean?): Nothing(source)
Deprecated (with error)
katachi cannot see which declaration assertFalse rejected. Use must / mustNot / mustBeEmpty.
Replace with
listOfNotNull(this).mustNot(function)Content copied to clipboard
Konsist's own assertion over a single declaration. Not usable here — see assertTrue.
Example 1: what to write instead
classes().first().assertFalse { it.hasPublicOrDefaultModifier } // compile error
classes().take(1).mustNot { it.hasPublicOrDefaultModifier } // okContent copied to clipboard
open fun <E : KoBaseProvider> Sequence<E?>.assertFalse(strict: Boolean = false, additionalMessage: String? = null, testName: String? = null, function: (E) -> Boolean?): Nothing(source)
Deprecated (with error)
katachi cannot see which declarations assertFalse rejected. Use toList() then must / mustNot.
Replace with
toList().mustNot(function)Content copied to clipboard
Konsist's own assertion over a sequence. Not usable here — see assertTrue.
Example 1: what to write instead
classes().asSequence().assertFalse { it.hasPublicOrDefaultModifier } // compile error
classes().asSequence().toList().mustNot { it.hasPublicOrDefaultModifier } // okContent copied to clipboard