/assertj-core-kotlin

a simple AssertJ wrapper for Kotlin

Primary LanguageKotlinApache License 2.0Apache-2.0

assertj-core-kotlin Build Status Coverage Status Maven Central

a thin and simple AssertJ wrapper for Kotlin

Motivation

AssertJ ist not usable from Kotlin by default, because there are a lot of overload ambiguity compile errors.

Usage

Just import assertThat from KotlinAssertions and most of AssertJ should work again:

import org.assertj.core.api.KotlinAssertions.assertThat
import org.junit.Test

class KotlinAssertionsExample {

    @Test
    fun simpleAssertion() {
        assertThat(10L.toString()).isEqualTo("10")
    }

}

Disclaimer

The software is not yet a complete wrapper. Your contributions are welcome.