Package jetbrains.buildServer.matcher
Class IsCollectionContainingMatcher<T>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.hamcrest.TypeSafeMatcher<Iterable<T>>
-
- jetbrains.buildServer.matcher.IsCollectionContainingMatcher<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
org.hamcrest.Matcher<Iterable<T>>
,org.hamcrest.SelfDescribing
public class IsCollectionContainingMatcher<T> extends org.hamcrest.TypeSafeMatcher<Iterable<T>>
Hamcrest'sIsCollectionContaining
matcher is broken in version 1.3 - it doesn't support expressions likeassertThat(Arrays.asList("foo", "bar"), hasItem(startsWith("ba")))
This is light-weight matcher analogous to hamcrest's one.
-
-
Constructor Summary
Constructors Constructor Description IsCollectionContainingMatcher(org.hamcrest.Matcher<T> elementMatcher)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
describeTo(org.hamcrest.Description description)
static <T> org.hamcrest.Matcher<Iterable<T>>
hasItem(org.hamcrest.Matcher<T> itemMatcher)
static <T> org.hamcrest.Matcher<Iterable<T>>
hasItem(T item)
static <T> org.hamcrest.Matcher<Iterable<T>>
hasItems(org.hamcrest.Matcher<T>... itemMatchers)
static <T> org.hamcrest.Matcher<Iterable<T>>
hasItems(T... items)
protected boolean
matchesSafely(Iterable<T> collection)
-
Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, describeMismatchSafely, matches
-
-
-
-
Constructor Detail
-
IsCollectionContainingMatcher
public IsCollectionContainingMatcher(org.hamcrest.Matcher<T> elementMatcher)
-
-
Method Detail
-
describeTo
public void describeTo(org.hamcrest.Description description)
-
hasItem
public static <T> org.hamcrest.Matcher<Iterable<T>> hasItem(org.hamcrest.Matcher<T> itemMatcher)
-
hasItem
public static <T> org.hamcrest.Matcher<Iterable<T>> hasItem(T item)
-
hasItems
public static <T> org.hamcrest.Matcher<Iterable<T>> hasItems(org.hamcrest.Matcher<T>... itemMatchers)
-
hasItems
public static <T> org.hamcrest.Matcher<Iterable<T>> hasItems(T... items)
-
-