Package org.junit.experimental.results
Class PrintableResult
- java.lang.Object
-
- org.junit.experimental.results.PrintableResult
-
public class PrintableResult extends java.lang.Object
A test result that prints nicely in error messages. This is only intended to be used in JUnit self-tests. For example:assertThat(testResult(HasExpectedException.class), isSuccessful());
-
-
Constructor Summary
Constructors Constructor Description PrintableResult(java.util.List<Failure> failures)
A result that includes the givenfailures
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
failureCount()
Returns the number of failures in this result.java.util.List<Failure>
failures()
Returns the failures in this result.static PrintableResult
testResult(java.lang.Class<?> type)
The result of running JUnit ontype
static PrintableResult
testResult(Request request)
The result of running JUnit on Requestrequest
java.lang.String
toString()
-
-
-
Constructor Detail
-
PrintableResult
public PrintableResult(java.util.List<Failure> failures)
A result that includes the givenfailures
-
-
Method Detail
-
testResult
public static PrintableResult testResult(java.lang.Class<?> type)
The result of running JUnit ontype
-
testResult
public static PrintableResult testResult(Request request)
The result of running JUnit on Requestrequest
-
failureCount
public int failureCount()
Returns the number of failures in this result.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-