public class ResultMatchers extends Object
assertThat(testResult(HasExpectedException.class), isSuccessful());
| Constructor | Description |
|---|---|
ResultMatchers() |
| Modifier and Type | Method | Description |
|---|---|---|
static org.hamcrest.Matcher<PrintableResult> |
failureCountIs(int count) |
Matches if there are
count failures |
static org.hamcrest.Matcher<PrintableResult> |
hasFailureContaining(String string) |
Matches if the result has one or more failures, and at least one of them
contains
string |
static org.hamcrest.Matcher<Object> |
hasSingleFailureContaining(String string) |
Matches if the result has exactly one failure, and it contains
string |
static org.hamcrest.Matcher<PrintableResult> |
isSuccessful() |
Matches if the tests are all successful
|
public ResultMatchers()
public static org.hamcrest.Matcher<PrintableResult> isSuccessful()
public static org.hamcrest.Matcher<PrintableResult> failureCountIs(int count)
count failurespublic static org.hamcrest.Matcher<Object> hasSingleFailureContaining(String string)
stringpublic static org.hamcrest.Matcher<PrintableResult> hasFailureContaining(String string)
stringCopyright © 2002–2018 JUnit. All rights reserved.