1 package vid.automation.test.utils;
3 import org.hamcrest.Matcher;
5 import java.util.ArrayList;
6 import java.util.Collection;
9 import static org.hamcrest.core.AllOf.allOf;
10 import static org.hamcrest.core.IsCollectionContaining.hasItem;
12 public class ExtendedHamcrestMatcher {
15 //this method return matcher for has items that support collection as input (Instead of ...)
16 public static <T> Matcher<Iterable<T>> hasItemsFromCollection(Collection<T> items) {
17 List<Matcher<? super Iterable<T>>> all = new ArrayList<>(items.size());
18 for (T element : items) {
19 all.add(hasItem(element));