类 ResultMatchers
- java.lang.Object
- org.junit.experimental.results.ResultMatchers
public class ResultMatchers extends Object
Matchers on a PrintableResult, to enable JUnit self-tests. For example:assertThat(testResult(HasExpectedException.class), isSuccessful());
构造器概要
构造器 构造器 说明 ResultMatchers()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static Matcher<PrintableResult>
failureCountIs(int count)
Matches if there arecount
failuresstatic Matcher<PrintableResult>
hasFailureContaining(String string)
Matches if the result has one or more failures, and at least one of them containsstring
static Matcher<Object>
hasSingleFailureContaining(String string)
Matches if the result has exactly one failure, and it containsstring
static Matcher<PrintableResult>
isSuccessful()
Matches if the tests are all successful
构造器详细资料
ResultMatchers
public ResultMatchers()
方法详细资料
isSuccessful
public static Matcher<PrintableResult> isSuccessful()
Matches if the tests are all successful
failureCountIs
public static Matcher<PrintableResult> failureCountIs(int count)
Matches if there arecount
failures
hasSingleFailureContaining
public static Matcher<Object> hasSingleFailureContaining(String string)
Matches if the result has exactly one failure, and it containsstring
hasFailureContaining
public static Matcher<PrintableResult> hasFailureContaining(String string)
Matches if the result has one or more failures, and at least one of them containsstring