public class

ResultMatchers

extends Object
java.lang.Object
   ↳ org.junit.experimental.results.ResultMatchers

Class Overview

Matchers on a PrintableResult, to enable JUnit self-tests. For example:

 		assertThat(testResult(HasExpectedException.class), isSuccessful());
 

Summary

Public Constructors
ResultMatchers()
Public Methods
static Matcher<PrintableResult> failureCountIs(int count)
Matches if there are count failures
static Matcher<PrintableResult> hasFailureContaining(String string)
Matches if the result has one or more failures, and at least one of them contains string
static Matcher<Object> hasSingleFailureContaining(String string)
Matches if the result has exactly one failure, and it contains string
static Matcher<PrintableResult> isSuccessful()
Matches if the tests are all successful
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ResultMatchers ()

Public Methods

public static Matcher<PrintableResult> failureCountIs (int count)

Matches if there are count failures

public static Matcher<PrintableResult> hasFailureContaining (String string)

Matches if the result has one or more failures, and at least one of them contains string

public static Matcher<Object> hasSingleFailureContaining (String string)

Matches if the result has exactly one failure, and it contains string

public static Matcher<PrintableResult> isSuccessful ()

Matches if the tests are all successful