Java Code Examples for org.hamcrest.CoreMatchers#allOf()

The following examples show how to use org.hamcrest.CoreMatchers#allOf() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FastForwardReporterTest.java    From helios with Apache License 2.0 4 votes vote down vote up
@SafeVarargs
private static Matcher<Metric> allOf(Matcher<Metric>... matchers) {
  return CoreMatchers.allOf(matchers);
}
 
Example 2
Source File: RegexMatchers.java    From HttpSessionReplacer with MIT License 2 votes vote down vote up
/**
 * Checks whether a {@link String} contains a subsequence matching any of
 * the given regular expressions.
 * @param patterns The patterns to match against
 * @return Matcher suitable for JUnit/Hamcrest matching
 * @see java.util.regex.Matcher#find()
 * @see #containsPattern(String)
 */
public static Matcher<String> containsAllPatterns(
    final String... patterns) {
    return CoreMatchers
        .allOf(createContainingMatchers(patterns));
}
 
Example 3
Source File: JenkinsMatchers.java    From jenkins-test-harness with MIT License 2 votes vote down vote up
/**
 * A matcher which checks that the class is a Utility class (i.e. is final and has only private constructors).
 *
 * @return A matcher which checks that the class is a Utility class (i.e. is final and has only private
 *         constructors).
 */
public static Matcher<Class<?>> isUtilityClass() {
    return CoreMatchers.allOf(isFinalClass(), isClassWithOnlyPrivateConstructors());
}