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