strikt icon indicating copy to clipboard operation
strikt copied to clipboard

An assertion library for Kotlin

Results 62 strikt issues
Sort by recently updated
recently updated
newest added

Makes `withFirst` iterable assertion infix for convenience

This is a request for a new assertion which checks whether the subject Iterable contains the given elements in order provided, possibly with other items between them. AssertJ has that...

Currently if some code wants to handle assertion failures, this doesn't work for strikt helpers like `first()` because `MappingException` extends `IncompleteExecutionException`, not `AssertionError`. eg: ```kotlin private val failures = mutableListOf()...

Closes https://github.com/robfletcher/strikt/issues/267

It's often the case that when comparing strings, you don't care about whitespace or line terminators A big headache in many projects test suites is that multiline strings are compared,...

The function is very useful but unfortunately Java introspection seems to have its own ideas about naming, so that properties are not ignored when their name starts with a lowercase...

``` "test" { val list = listOf(1, 2) val array = arrayOf(1, 2) expect { that(list).hasSize(2) // works that(array).hasSize(2) //

Comparing Jackson JsonNode objects is useful more matching up JSON, sidestepping formatting and key-order considerations. When doing `expectThat(actualNode).isEqualTo(expectedNode)` the comparison works as expected, however the failure output (when the nodes...

I really like syntax "get with lambdas" but it can cause false results or mislead when local variable has the same name as field in subject. See example: ``` import...