Package-level declarations

Types

Link copied to clipboard
class ManualClock(time: Instant) : Clock

Functions

Link copied to clipboard
fun <T> assertContains(array: Array<T>, value: T)

Asserts that value is an element in array.

fun <T> assertContains(collection: Collection<T>, value: T)

Asserts that value is an element in collection.

fun <T> assertContains(iterable: Iterable<T>, value: T)

Asserts that value is an element in iterable.

fun <T : Comparable<T>> assertContains(range: ClosedRange<T>, value: T)

Asserts that value is within range.

fun <T> assertContains(sequence: Sequence<T>, value: T)

Asserts that value is an element in sequence.

Link copied to clipboard
fun assertSimilar(target: Int, epsilon: Int, value: Int)
fun assertSimilar(target: Long, epsilon: Long, value: Long)
fun assertSimilar(target: Instant, epsilon: Duration, value: Instant)

Asserts that value is equal to target, plus or minus some epsilon.

fun assertSimilar(target: LocalDateTime, epsilon: Duration, value: LocalDateTime, timeZone: TimeZone = TimeZone.currentSystemDefault())

Asserts that value is equal to target, plus or minus some epsilon. If an explicit timeZone is not specified, the system default is used.