org.test4j.hamcrest.JavaLangMatcherAssert Maven / Gradle / Ivy
package org.test4j.hamcrest;
import org.hamcrest.Matcher;
/**
* 兼容Java " assert true/false "语法
* Integration method for use with Java's assert
keyword. Example:
*
*
* assert that("Foo", startsWith("f"));
*
*/
public class JavaLangMatcherAssert {
private JavaLangMatcherAssert() {
}
@SuppressWarnings("rawtypes")
public static boolean that(T argument, Matcher matcher) {
return matcher.matches(argument);
}
}