Simple (work in progress) demo app to compare assertion libraries on Kotlin and Android (coming soon)
- JUnit4 (source) - the classic
- Truth (source) - Google's fluent assertion framework
- AssertK (source) - Kotlin assertions inspired by AssertJ
- JUnit5 (source) - not yet supported on Android*
- Hamcrest (source) - matchers ex.
assertThat(theBiscuit, equalTo(myBiscuit))
- AssertJ (source) - the original fluent assertions for Java
- kotlin.test (source) - Kotlin's built-in assertions
- Strikt (source) - lambdas and extension functions
- Kluent) (source) - infix notation ex.
"hello" shouldBeEqualTo "hello"
- Atrium (source) - mutliplatform support
- Expekt (source) - BDD style assertions ex.
23.should.equal(23)
- HamKrest (source) - Kotlin matchers
assertThat("xyz", startsWith("x") and !containsSubstring("a"))
- Kotest (source) - popular (4k+ stars) assertions and full test framework with multiplatform support
* open source Gradle plugin for running JUnit5 tests on Android