Class TCKMatchers
- java.lang.Object
-
- org.eclipse.microprofile.openapi.tck.utils.TCKMatchers
-
public final class TCKMatchers extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.hamcrest.Matcher<Number>comparesEqualToNumber(Number expected)Creates a matcher ofComparable<Number>that matches when the examined number is equal to the specified value, as reported by thecompareTomethod of theBigDecimals created by passing both Number values'doubleValuetoBigDecimal.valueOf(double).
-
-
-
Method Detail
-
comparesEqualToNumber
public static org.hamcrest.Matcher<Number> comparesEqualToNumber(Number expected)
Creates a matcher ofComparable<Number>that matches when the examined number is equal to the specified value, as reported by thecompareTomethod of theBigDecimals created by passing both Number values'doubleValuetoBigDecimal.valueOf(double).For example:
assertThat(1, comparesEqualToNumber(1))
- Parameters:
expected- the value which, when passed to the compareTo method of the examined object following conversion to BigDecimal, should return zero- Returns:
- a matcher to test the equality of the examined Number
-
-