doc / ch.tutteli.atrium.api.cc.de_CH / istMitFehlerToleranz

istMitFehlerToleranz

fun Assert<Float>.istMitFehlerToleranz(expected: Float, tolerance: Float): AssertionPlant<Float> (source)
Deprecated: api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0


fun Assert<Double>.istMitFehlerToleranz(expected: Double, tolerance: Double): AssertionPlant<Double> (source)
Deprecated: api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0


fun <T : BigDecimal> Assert<T>.istMitFehlerToleranz(expected: T, tolerance: T): AssertionPlant<T> (source)
Deprecated: api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0

Makes the assertion that the Assert.subject is equal to expected with an error tolerance (range including bounds).

It effectively compares the absolute difference between Assert.subject and expected and compares it with the tolerance. As long as it is less than or equal the tolerance the assertion holds; otherwise it fails. A more mathematical way of expressing the assertion is the following inequality:

| Assert.subject - expected | ≤ tolerance

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
This plant to support a fluent API.