JUnit Testing Framework


Qualified supports writing test fixtures for Kotlin using JUnit 4.

Quick Start

Solution Code

fun add(a: Int, b: Int) = a + b

Test Fixture:

import kotlin.test.assertEquals
import org.junit.Test

class TestAdd {
    fun addTest() {
        assertEquals(2, add(1, 1))

Assertion Libraries

Following assertion libraries can be used:

Learn More

You can learn more on the JUnit website.