public class ExpectDouble extends Object
Constructor and Description |
---|
ExpectDouble(Double actual)
Creates and instance for the given non-null map.
|
Modifier and Type | Method and Description |
---|---|
protected T |
check(boolean cond,
String msg,
Object... args) |
static ExpectDouble |
expectDouble(Double actual)
Check for non-null
Double and provided further checks on the actual
double in a fluent API. |
ExpectDouble |
isBetween(Double start,
Double end)
Checks, if actual is between start (inclusive) and end (exclusive).
|
ExpectDouble |
isCloseTo(Double expected,
Double eps)
Checks, if actual is close to expected regarding eps.
|
ExpectDouble |
isNaN()
Checks, if actual is not a number (NaN).
|
ExpectDouble |
isNotBetween(Double start,
Double end)
Checks, if actual is not between start (inclusive) and end (exclusive).
|
ExpectDouble |
isNotCloseTo(Double expected,
Double eps)
Checks, if actual is not close to expected regarding eps.
|
ExpectDouble |
isNotNaN()
Checks, if actual is not not a number (NaN).
|
public ExpectDouble(Double actual)
Creates and instance for the given non-null map.
public static ExpectDouble expectDouble(Double actual)
Check for non-null Double
and provided further checks on the actual
double in a fluent API.
actual
- The double to check.ExpectDouble
to express further expectations on the actual
double.public ExpectDouble isCloseTo(Double expected, Double eps)
Checks, if actual is close to expected regarding eps.
Mathematically |actual - expected| < eps
expected
- The expected double near of actual.eps
- Epsilon value.public ExpectDouble isNotCloseTo(Double expected, Double eps)
Checks, if actual is not close to expected regarding eps.
Mathematically |actual - expected| >= eps
expected
- The expected double near of actual.eps
- Epsilon value.public ExpectDouble isNaN()
Checks, if actual is not a number (NaN).
public ExpectDouble isNotNaN()
Checks, if actual is not not a number (NaN).
public ExpectDouble isBetween(Double start, Double end)
Checks, if actual is between start (inclusive) and end (exclusive).
Mathematically start ⇐ actual < end.
start
- Interval start (inclusive).end
- Interval end (exclusive).public ExpectDouble isNotBetween(Double start, Double end)
Checks, if actual is not between start (inclusive) and end (exclusive).
start
- Interval start (inclusive).end
- Interval end (exclusive).Copyright © 2019. All rights reserved.