Class TextReportExtension

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension

    @ParametersAreNonnullByDefault
    public class TextReportExtension
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.AfterAllCallback
    Since:
    1.0.0
    • Constructor Summary

      Constructors 
      Constructor Description
      TextReportExtension()
      Initialize default text report extension that log successful and failed tests.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext context)  
      TextReportExtension onFailedTest​(boolean onFailedTest)
      Initialize text report extension with specified failed tests log strategy.
      TextReportExtension onSucceededTest​(boolean onSucceededTest)
      Initialize text report extension with specified successful tests log strategy.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextReportExtension

        public TextReportExtension()
        Initialize default text report extension that log successful and failed tests.
    • Method Detail

      • onFailedTest

        @Nonnull
        public TextReportExtension onFailedTest​(boolean onFailedTest)
        Initialize text report extension with specified failed tests log strategy.
        Parameters:
        onFailedTest - parameter that indicate if need to log failed tests
        Returns:
        current extension instance
      • onSucceededTest

        @Nonnull
        public TextReportExtension onSucceededTest​(boolean onSucceededTest)
        Initialize text report extension with specified successful tests log strategy.
        Parameters:
        onSucceededTest - parameter that indicate if need to log successful tests
        Returns:
        current extension instance
      • beforeEach

        public void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallback
      • afterEach

        public void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        afterEach in interface org.junit.jupiter.api.extension.AfterEachCallback
      • afterAll

        public void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback