/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> org.hamcrest.Matcher<java.lang.Iterable<U>> everyItem(org.hamcrest.Matcher<U> itemMatcher) { return org.hamcrest.core.Every.<U>everyItem(itemMatcher); }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> Matcher<Iterable<? extends U>> everyItem(final Matcher<U> itemMatcher) { return new Every<>(itemMatcher); } }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> org.hamcrest.Matcher<java.lang.Iterable<U>> everyItem(org.hamcrest.Matcher<U> itemMatcher) { return org.hamcrest.core.Every.<U>everyItem(itemMatcher); }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ @Factory public static <U> Matcher<Iterable<U>> everyItem(final Matcher<U> itemMatcher) { return new Every<U>(itemMatcher); } }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> org.hamcrest.Matcher<java.lang.Iterable<U>> everyItem(org.hamcrest.Matcher<U> itemMatcher) { return org.hamcrest.core.Every.<U>everyItem(itemMatcher); }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ @Factory public static <U> Matcher<Iterable<U>> everyItem(final Matcher<U> itemMatcher) { return new Every<U>(itemMatcher); } }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> org.hamcrest.Matcher<java.lang.Iterable<? extends U>> everyItem(org.hamcrest.Matcher<U> itemMatcher) { return org.hamcrest.core.Every.everyItem(itemMatcher); }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> Matcher<Iterable<? extends U>> everyItem(final Matcher<U> itemMatcher) { return new Every<U>(itemMatcher); } }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> org.hamcrest.Matcher<java.lang.Iterable<? extends U>> everyItem(org.hamcrest.Matcher<U> itemMatcher) { return org.hamcrest.core.Every.everyItem(itemMatcher); }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ @Factory public static <U> Matcher<Iterable<U>> everyItem(final Matcher<U> itemMatcher) { return new Every<U>(itemMatcher); } }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> org.hamcrest.Matcher<java.lang.Iterable<U>> everyItem(org.hamcrest.Matcher<U> itemMatcher) { return org.hamcrest.core.Every.<U>everyItem(itemMatcher); }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> Matcher<Iterable<? extends U>> everyItem(final Matcher<U> itemMatcher) { return new Every<>(itemMatcher); } }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> org.hamcrest.Matcher<java.lang.Iterable<? extends U>> everyItem(org.hamcrest.Matcher<U> itemMatcher) { return org.hamcrest.core.Every.everyItem(itemMatcher); }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ @Factory public static <U> Matcher<Iterable<U>> everyItem(final Matcher<U> itemMatcher) { return new Every<U>(itemMatcher); } }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ @Factory public static <U> Matcher<Iterable<U>> everyItem(final Matcher<U> itemMatcher) { return new Every<U>(itemMatcher); } }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ public static <U> org.hamcrest.Matcher<java.lang.Iterable<? extends U>> everyItem(org.hamcrest.Matcher<U> itemMatcher) { return org.hamcrest.core.Every.<U>everyItem(itemMatcher); }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ @Factory public static <U> Matcher<Iterable<U>> everyItem(final Matcher<U> itemMatcher) { return new Every<U>(itemMatcher); } }
@Test public void retryPolicyExhaustedDueToInvalidConnectionExecutingOperation() throws Exception { flowRunner("fail-operation-with-connection-exception") .runExpectingException(errorType("PETSTORE", CONNECTIVITY_ERROR_IDENTIFIER)); assertThat(getConnectionThreads(), hasSize(3)); assertThat(getConnectionThreads().stream().map(t -> t.getThreadGroup()).collect(toSet()), everyItem(sameInstance(UNIT_TEST_THREAD_GROUP))); }
/** * Creates a matcher for {@link Iterable}s that only matches when a single pass over the * examined {@link Iterable} yields items that are all matched by the specified * <code>itemMatcher</code>. * <p/> * For example: * <pre>assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))</pre> * * @param itemMatcher * the matcher to apply to every item provided by the examined {@link Iterable} */ @Factory public static <U> Matcher<Iterable<U>> everyItem(final Matcher<U> itemMatcher) { return new Every<U>(itemMatcher); } }