Package org.faktorips.testsupport
Class ValueSetMatchers
java.lang.Object
org.faktorips.testsupport.ValueSetMatchers
Hamcrest
Matchers for use in JUnit tests of Faktor-IPS value
sets.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.hamcrest.Matcher<org.faktorips.valueset.ValueSet<T>>contains(T... values) Creates aMatcherthat matches aValueSetif itcontainsthe given values.static org.hamcrest.Matcher<org.faktorips.valueset.ValueSet<?>>Creates aMatcherthat matches aValueSetif itcontains null.static org.hamcrest.Matcher<org.faktorips.valueset.ValueSet<?>>empty()Creates aMatcherthat matches aValueSetif itis empty.static <T extends Comparable<T>>
org.hamcrest.Matcher<org.faktorips.valueset.ValueSet<T>>isRange(T lower, T upper) Creates aMatcherthat matches aValueSetif itis a rangewith the given lower and upper bound.
-
Method Details
-
empty
public static org.hamcrest.Matcher<org.faktorips.valueset.ValueSet<?>> empty()Creates aMatcherthat matches aValueSetif itis empty. -
containsNull
public static org.hamcrest.Matcher<org.faktorips.valueset.ValueSet<?>> containsNull()Creates aMatcherthat matches aValueSetif itcontains null. -
isRange
public static <T extends Comparable<T>> org.hamcrest.Matcher<org.faktorips.valueset.ValueSet<T>> isRange(T lower, T upper) Creates aMatcherthat matches aValueSetif itis a rangewith the given lower and upper bound.- Type Parameters:
T- the type of the range's bounds- Parameters:
lower- the expected lower boundupper- the expected upper bound
-
contains
public static <T> org.hamcrest.Matcher<org.faktorips.valueset.ValueSet<T>> contains(T... values) Creates aMatcherthat matches aValueSetif itcontainsthe given values.- Type Parameters:
T- the object type to match- Parameters:
values- the expected values
-