Class SkipExtension

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

    public class SkipExtension
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback
    Extension to skip test under particular conditions.
    Author:
    Daniel Sagenschneider
    • Constructor Detail

      • SkipExtension

        public SkipExtension​(boolean isSkip)
        Instantiate.
        Parameters:
        isSkip - Indicates whether to skip.
      • SkipExtension

        public SkipExtension​(boolean isSkip,
                             java.lang.String message)
        Instantiate.
        Parameters:
        isSkip - Indicates whether to skip.
        message - Skip message.
    • Method Detail

      • beforeAll

        public void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext context)
                       throws java.lang.Exception
        Specified by:
        beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
        Throws:
        java.lang.Exception
      • beforeEach

        public void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext context)
                        throws java.lang.Exception
        Specified by:
        beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallback
        Throws:
        java.lang.Exception