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
Matcher that matches if the examined
Comparable
value is greater than the provided value.-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
-
Method Details
-
matches
-
describeTo
public void describeTo(org.hamcrest.Description description) -
describeMismatch
- Specified by:
describeMismatch
in interfaceorg.hamcrest.Matcher<T extends Comparable<T>>
- Overrides:
describeMismatch
in classorg.hamcrest.BaseMatcher<T extends Comparable<T>>
-
lessThan
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
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)))
-