Class SingletonServer

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource

    public class SingletonServer
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
    A singleton server instance for all test cases.
    Since:
    1.0.4
    Author:
    jumperchen
    • Constructor Summary

      Constructors 
      Constructor Description
      SingletonServer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext eContext)  
      void close()  
      org.eclipse.jetty.server.Server getServer()  
      • Methods inherited from class java.lang.Object

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

      • SingletonServer

        public SingletonServer()
    • Method Detail

      • beforeAll

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

        public org.eclipse.jetty.server.Server getServer()
      • close

        public void close()
                   throws java.lang.Throwable
        Specified by:
        close in interface org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
        Throws:
        java.lang.Throwable