public class IsNegativeMatcher extends org.hamcrest.TypeSafeMatcher<Number>
Number is negative.
This is particularly useful in situations where the exact value of an operation is unpredictable.
For example:
assertThat(duration.compareTo(otherDuration), isNegative());
| Constructor and Description |
|---|
IsNegativeMatcher() |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description)
Describes the "expected" pat of the test description.
|
static IsNegativeMatcher |
isNegative()
Creates a matcher that matches if the examined object is a negative number.
|
public static IsNegativeMatcher isNegative()
public void describeTo(org.hamcrest.Description description)
description - the Description to be appended toCopyright © 2022. All rights reserved.