Class 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 Detail

      • PrintableResult

        public PrintableResult​(java.util.List<Failure> failures)
        A result that includes the given failures
    • Method Detail

      • failureCount

        public int failureCount()
        Returns the number of failures in this result.
      • failures

        public java.util.List<Failurefailures()
        Returns the failures in this result.
        Since:
        4.13
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object