Package org.faktorips.testsupport
Class ValueSetMatchers
- java.lang.Object
-
- org.faktorips.testsupport.ValueSetMatchers
-
public class ValueSetMatchers extends java.lang.ObjectHamcrestMatchersfor use in JUnit tests of Faktor-IPSvalue sets.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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<?>>containsNull()Creates aMatcherthat matches aValueSetif itcontains null.static org.hamcrest.Matcher<org.faktorips.valueset.ValueSet<?>>empty()Creates aMatcherthat matches aValueSetif itis empty.static <T extends java.lang.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 Detail
-
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 java.lang.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
-
-