vertx / io.vertx.rxjava.ext.unit / TestContext / assertInRange

assertInRange

open fun assertInRange(expected: Double, actual: Double, delta: Double): TestContext

Asserts that the expected double argument is equals to the actual double argument within a positive delta. If the arguments do not satisfy this, an assertion error is thrown otherwise the execution continue.

Parameters

expected - the object the actual object is supposedly equals to

actual - the actual object to test

delta - the maximum delta

Return
a reference to this, so the API can be used fluently

open fun assertInRange(expected: Double, actual: Double, delta: Double, message: String): TestContext

Asserts that the expected double argument is equals to the actual double argument within a positive delta. If the arguments do not satisfy this, an assertion error is thrown otherwise the execution continue.

Parameters

expected - the object the actual object is supposedly equals to

actual - the actual object to test

delta - the maximum delta

message - the failure message

Return
a reference to this, so the API can be used fluently