public final class TCKMatchers extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.hamcrest.Matcher<Number> |
comparesEqualToNumber(Number expected)
Creates a matcher of
Comparable<Number> that
matches when the examined number is equal to the specified value, as
reported by the compareTo method of the BigDecimals
created by passing both Number values' doubleValue to BigDecimal.valueOf(double). |
public static org.hamcrest.Matcher<Number> comparesEqualToNumber(Number expected)
Comparable<Number> that
matches when the examined number is equal to the specified value, as
reported by the compareTo method of the BigDecimals
created by passing both Number values' doubleValue to BigDecimal.valueOf(double).
For example:
assertThat(1, comparesEqualToNumber(1))
expected - the value which, when passed to the compareTo method of the
examined object following conversion to BigDecimal, should
return zeroCopyright © 2022 Eclipse Foundation. All rights reserved.