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 TypeMethodDescriptionvoiddescribeMismatch(Object item, org.hamcrest.Description description) voiddescribeTo(org.hamcrest.Description description) static <T extends Comparable<T>>
org.hamcrest.Matcher<T>greaterThan(T value) Creates a matcher that matches if the examinedComparablevalue 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 examinedComparablevalue is less than the provided value.booleanMethods 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:
describeMismatchin interfaceorg.hamcrest.Matcher<T extends Comparable<T>>- Overrides:
describeMismatchin classorg.hamcrest.BaseMatcher<T extends Comparable<T>>
-
lessThan
Creates a matcher that matches if the examinedComparablevalue is less than the provided value.For example:
assertThat(Integer.valueOf(221), lessThan(Integer.valueOf(223)))
-
greaterThan
Creates a matcher that matches if the examinedComparablevalue is greater than the provided value.For example:
assertThat(Integer.valueOf(223), greaterThan(Integer.valueOf(221)))
-