Class StoredReusableApp

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

    public class StoredReusableApp
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
    Storage value for reusable application. Value would be created by the first test (using reusable app) and would be closed after all tests (automatically by junit).

    Reusable app is identified in root storage by declaration class name because only one application extension could be used in single test.

    Since:
    19.12.2022
    • Constructor Detail

      • StoredReusableApp

        public StoredReusableApp​(java.lang.Class<?> declaration,
                                 java.lang.String source,
                                 io.dropwizard.testing.DropwizardTestSupport<?> support,
                                 ClientSupport client)
    • Method Detail

      • getDeclaration

        public java.lang.Class<?> getDeclaration()
        Returns:
        base test class where extension was declared
      • getSource

        public java.lang.String getSource()
        Returns:
        declaration source (base class + annotation or field name)
      • getSupport

        public io.dropwizard.testing.DropwizardTestSupport<?> getSupport()
        Returns:
        reusable support object
      • getClient

        public ClientSupport getClient()
        Returns:
        reusable client instance
      • close

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object