assertk
assertk copied to clipboard
assertions for kotlin inspired by assertj
I regularly find myself in a position where I have an `Iterable` of elements, where I want to extract a property which itself is an `Iterable`. Up to this point,...
Fix for a bug that occurred when `exactly` was called with multiple failing assertions described in #421
Fix for #421 uses `given` to wrap multiple assertions. One potential issue here is if there are multiple failures in a block, only the first will be shown as a...
`exactly` assertion for collections works incorrectly when multiple assertions are provided in the assertion block. Minimal failing scenario: ``` // snippet #1 @Test fun test() { val c = listOf(1,...
`assertThat(1).isEqualTo("a")` shouldn't compile, but it does.
I think that would be helpful to add two assertions for Iterables: `containsOnce(elem)` - works as `contains`, but throws when elem occurs more than one time `containsAllOnce(vararg elements)` - as...
fixing #399, proposition of new iterable assertions.
I faced a known issue that almost made me switch to Truth 😅 Eventually I found a solution, and I believe it would be useful to others as well.
The standard syntax is to pass the value as a parameter to assertThat as in ``` assertThat(someExpressionToGetTheValue()) ``` But depending on the complexity of the expression this can get harder...