Class EurekaServerExtension

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

    public class EurekaServerExtension
    extends Object
    implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
    JUnit Jupiter extension that starts a local Eureka testing server before any test has run, and stops the server after all tests have (successfully or otherwise) completed.
    • Field Detail

      • EUREKA_API_BASE_PATH

        public static final String EUREKA_API_BASE_PATH
        The base path at which the testing Eureka server will respond to requests.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EurekaServerExtension

        public EurekaServerExtension()
    • Method Detail

      • beforeAll

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

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