JUnitAsserter

object JUnitAsserter : Asserter (source)

Platform and version requirements: JVM

Implements kotlin.test assertions by delegating them to org.junit.Assert class.

Functions

assertEquals

fun assertEquals(
    message: String?,
    expected: Any?,
    actual: Any?
): Unit

Asserts that the specified values are equal.

assertNotEquals

fun assertNotEquals(
    message: String?,
    illegal: Any?,
    actual: Any?
): Unit

Asserts that the specified values are not equal.

assertNotNull

fun assertNotNull(message: String?, actual: Any?): Unit

Asserts that the specified value is not null.

assertNotSame

fun assertNotSame(
    message: String?,
    illegal: Any?,
    actual: Any?
): Unit

Asserts that the specified values are not the same instance.

assertNull

fun assertNull(message: String?, actual: Any?): Unit

Asserts that the specified value is null.

assertSame

fun assertSame(
    message: String?,
    expected: Any?,
    actual: Any?
): Unit

Asserts that the specified values are the same instance.

fail

fun fail(message: String?): Nothing

Fails the current test with the specified message.

Inherited Functions

assertTrue

open fun assertTrue(
    lazyMessage: () -> String?,
    actual: Boolean
): Unit
open fun assertTrue(message: String?, actual: Boolean): Unit

Asserts that the specified value is true.