Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

kotools/assert

Repository files navigation

This project is deprecated. We recommend using the testing library from Kotlin instead.

Kotools Assert

Maven Central Kotlin

Kotools Assert is a multiplatform library providing lightweight assertions for Kotlin.

This library currently supports the JVM, JS and Native platforms.

1 assertEquals 1
2 assertNotEquals 0

assertNull { null }
null.assertNull()

assertNotNull { 3 }
3.assertNotNull()

assertPass { println("Hello") }
assertFails { throw Exception() }
assertFailsWith<RuntimeException> { throw RuntimeException() }

Installation

Gradle

Kotlin DSL

testImplementation("io.github.kotools:assert:3.0.2")

Groovy DSL

testImplementation 'io.github.kotools:assert:3.0.2'

Maven

<dependency>
    <groupId>io.github.kotools</groupId>
    <artifactId>assert</artifactId>
    <version>3.0.2</version>
    <scope>test</scope>
</dependency>

Documentation

Latest documentation of Kotools Assert is available here.

Contributing

Feel free to contribute to the project with issues and pull requests.

This project follows the Conventional Commits guidelines for committing with Git. Please read the specifications before committing to this project.

License

This project is licensed under the MIT License.