/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<>(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<T>(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<T>(matchers); }
public CombinableMatcher<T> and(Matcher<? super T> other) { return new CombinableMatcher<T>(new AllOf<T>(templatedListWith(other))); }
public CombinableMatcher<T> and(Matcher<? super T> other) { return new CombinableMatcher<T>(new AllOf<T>(templatedListWith(other))); }
public CombinableMatcher<T> and(Matcher<? super T> other) { return new CombinableMatcher<>(new AllOf<>(templatedListWith(other))); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<>(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<T>(matchers); }
public CombinableMatcher<T> and(Matcher<? super T> other) { return new CombinableMatcher<T>(new AllOf<T>(templatedListWith(other))); }
public CombinableMatcher<T> and(Matcher<? super T> other) { return new CombinableMatcher<T>(new AllOf<T>(templatedListWith(other))); }
@Factory @SuppressWarnings({ "unchecked", "rawtypes" }) public static <T, V> Matcher<Map<? super T, ? super V>> hasAllEntries(Map<T, V> entries) { List<Matcher<Map<? super T, ? super V>>> matchers = new ArrayList<>(entries.size()); for (Map.Entry<T, V> entry : entries.entrySet()) { final V value = entry.getValue(); if (value instanceof Matcher<?>) { matchers.add(hasEntry(entry.getKey(), (Matcher<V>) value)); } else { matchers.add(hasEntry(entry.getKey(), value)); } } //return AllOf.allOf(matchers); //Does not work with Hamcrest 1.3 return new AllOf(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<>(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<T>(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<T>(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<T>(matchers); }
/** * Evaluates to true only if ALL of the passed in matchers evaluate to true. */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? extends T>> matchers) { return new AllOf<T>(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<T>(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<T>(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<T>(matchers); }
/** * Creates a matcher that matches if the examined object matches <b>ALL</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", allOf(startsWith("my"), containsString("Val")))</pre> */ @Factory public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) { return new AllOf<T>(matchers); }