Class Failures


  • public class Failures
    extends Object
    Utility class for working with Result.getFailures()
    Since:
    5.9.5
    • Constructor Detail

      • Failures

        public Failures​(List<org.junit.runner.notification.Failure> failures)
      • Failures

        public Failures​(org.junit.runner.Result result)
    • Method Detail

      • fail

        public void fail​(String originalMessage,
                         String customMessage)
        Call Assert.fail(String) with a nice expanded string if there are failures. It also replaces original failure messages with a custom one if originalMessage is not null.
        Parameters:
        originalMessage - Message to replace if found in a failure
        customMessage - Custom message to use as replacement for originalMessage