assertSimilar

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.