Class ExternalZkXml

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

    public class ExternalZkXml
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.TestInstancePostProcessor, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
    Load an external zk.xml for testing.
    Author:
    rudyhuang, jumperchen
    • Constructor Summary

      Constructors 
      Constructor Description
      ExternalZkXml​(java.lang.Class<? extends BaseTestCase> testClass)
      Pass a test class and will find zk.xml by a convention rule.
      ExternalZkXml​(java.lang.String configPath)
      Pass a path to zk.xml manually.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void after()  
      void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)  
      protected void before()  
      void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void postProcessTestInstance​(java.lang.Object testInstance, org.junit.jupiter.api.extension.ExtensionContext context)  
      • Methods inherited from class java.lang.Object

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

      • ExternalZkXml

        public ExternalZkXml​(java.lang.String configPath)
        Pass a path to zk.xml manually.
        Parameters:
        configPath - a path to zk.xml
      • ExternalZkXml

        public ExternalZkXml​(java.lang.Class<? extends BaseTestCase> testClass)
        Pass a test class and will find zk.xml by a convention rule.

        e.g. F95_ZK_1234Test => /test2/F95-ZK-1234-zk.xml

        Parameters:
        testClass - a test class (WebDriverTestCase only)
    • Method Detail

      • before

        protected void before()
      • after

        protected void after()
      • afterAll

        public void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)
                      throws java.lang.Exception
        Specified by:
        afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback
        Throws:
        java.lang.Exception
      • 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
      • postProcessTestInstance

        public void postProcessTestInstance​(java.lang.Object testInstance,
                                            org.junit.jupiter.api.extension.ExtensionContext context)
                                     throws java.lang.Exception
        Specified by:
        postProcessTestInstance in interface org.junit.jupiter.api.extension.TestInstancePostProcessor
        Throws:
        java.lang.Exception