PrintableResult (JUnit API)
Date: 2011-08-22

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.junit.experimental.results
Class PrintableResult

    java.lang.Object
      org.junit.experimental.results.PrintableResult

    public class PrintableResult

extends 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
`PrintableResult(List<Failure> failures)` A result that includes the given `failures`

Method Summary
`int` | `failureCount()` Returns the number of failures in this result.
`static PrintableResult` | `testResult(Class<?> type)` The result of running JUnit on `type`
`static PrintableResult` | `testResult(Request request)` The result of running JUnit on Request `request`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PrintableResult

    public PrintableResult(List<Failure> failures)

  A result that includes the given `failures`

Method Detail

### testResult

    public static PrintableResult testResult(Class<?> type)

  The result of running JUnit on `type`

### testResult

    public static PrintableResult testResult(Request request)

  The result of running JUnit on Request `request`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### failureCount

    public int failureCount()

  Returns the number of failures in this result.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD