Class Matchers
- java.lang.Object
-
- software.amazon.awssdk.testutils.hamcrest.Matchers
-
public final class Matchers extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> org.hamcrest.Matcher<Collection<T>>containsOnly(org.hamcrest.Matcher<? extends T>... matchers)Creates a matcher that matches if the examined collection matches the specified items in any orderstatic <T> org.hamcrest.Matcher<Collection<T>>containsOnly(T... items)Creates a matcher that matches if the examined collection matches the specified items in any orderstatic <T> org.hamcrest.Matcher<Collection<T>>containsOnlyInOrder(org.hamcrest.Matcher<? extends T>... matchers)Creates a matcher that matches if the examined collection matches the specified matchers in orderstatic <T> org.hamcrest.Matcher<Collection<T>>containsOnlyInOrder(T... items)Creates a matcher that matches if the examined collection matches the specified items in order
-
-
-
Method Detail
-
containsOnlyInOrder
public static <T> org.hamcrest.Matcher<Collection<T>> containsOnlyInOrder(org.hamcrest.Matcher<? extends T>... matchers)
Creates a matcher that matches if the examined collection matches the specified matchers in orderFor example:
assertThat(Arrays.asList("foo", "bar"), containsOnlyInOrder(startsWith("f"), endsWith("ar")))
-
containsOnlyInOrder
public static <T> org.hamcrest.Matcher<Collection<T>> containsOnlyInOrder(T... items)
Creates a matcher that matches if the examined collection matches the specified items in orderFor example:
assertThat(Arrays.asList("foo", "bar"), containsOnlyInOrder("foo", "bar"))
-
containsOnly
public static <T> org.hamcrest.Matcher<Collection<T>> containsOnly(org.hamcrest.Matcher<? extends T>... matchers)
Creates a matcher that matches if the examined collection matches the specified items in any orderFor example:
assertThat(Arrays.asList("bar", "foo"), containsOnly(startsWith("f"), endsWith("ar")))
-
containsOnly
public static <T> org.hamcrest.Matcher<Collection<T>> containsOnly(T... items)
Creates a matcher that matches if the examined collection matches the specified items in any orderFor example:
assertThat(Arrays.asList("bar", "foo"), containsOnly("foo", "bar"))
-
-