Class CompareMatcher<T extends Comparable<T>>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- com._1c.g5.v8.dt.testing.matchers.CompareMatcher<T>
-
- All Implemented Interfaces:
org.hamcrest.Matcher<T>
,org.hamcrest.SelfDescribing
public class CompareMatcher<T extends Comparable<T>> extends org.hamcrest.BaseMatcher<T>
Matcher that matches if the examinedComparable
value is greater than the provided value.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
describeMismatch(Object item, org.hamcrest.Description description)
void
describeTo(org.hamcrest.Description description)
static <T extends Comparable<T>>
org.hamcrest.Matcher<T>greaterThan(T value)
Creates a matcher that matches if the examinedComparable
value is greater than the provided value.static <T extends Comparable<T>>
org.hamcrest.Matcher<T>lessThan(T value)
Creates a matcher that matches if the examinedComparable
value is less than the provided value.boolean
matches(Object item)
-
-
-
Method Detail
-
matches
public boolean matches(Object item)
-
describeTo
public void describeTo(org.hamcrest.Description description)
-
describeMismatch
public void describeMismatch(Object item, org.hamcrest.Description description)
- Specified by:
describeMismatch
in interfaceorg.hamcrest.Matcher<T extends Comparable<T>>
- Overrides:
describeMismatch
in classorg.hamcrest.BaseMatcher<T extends Comparable<T>>
-
lessThan
public static <T extends Comparable<T>> org.hamcrest.Matcher<T> lessThan(T value)
Creates a matcher that matches if the examinedComparable
value is less than the provided value.For example:
assertThat(Integer.valueOf(221), lessThan(Integer.valueOf(223)))
-
greaterThan
public static <T extends Comparable<T>> org.hamcrest.Matcher<T> greaterThan(T value)
Creates a matcher that matches if the examinedComparable
value is greater than the provided value.For example:
assertThat(Integer.valueOf(223), greaterThan(Integer.valueOf(221)))
-
-