public class ResultMatchers extends Object
assertThat(testResult(HasExpectedException.class), isSuccessful());
| Constructor and Description |
|---|
ResultMatchers()
Deprecated.
will be private soon.
|
| Modifier and Type | Method and Description |
|---|---|
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> |
hasSingleFailureMatching(Matcher<Throwable> matcher)
Matches if the result has exactly one failure matching the given matcher.
|
static Matcher<PrintableResult> |
isSuccessful()
Matches if the tests are all successful
|
@Deprecated public ResultMatchers()
public static Matcher<PrintableResult> isSuccessful()
public static Matcher<PrintableResult> failureCountIs(int count)
count failurespublic static Matcher<Object> hasSingleFailureContaining(String string)
stringpublic static Matcher<PrintableResult> hasSingleFailureMatching(Matcher<Throwable> matcher)
public static Matcher<PrintableResult> hasFailureContaining(String string)
stringCopyright © 2002–2020 JUnit. All rights reserved.