Class StoredReusableApp
java.lang.Object
ru.vyarus.dropwizard.guice.test.util.StoredReusableApp
- All Implemented Interfaces:
org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
public class StoredReusableApp
extends 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 Summary
ConstructorsConstructorDescriptionStoredReusableApp(Class<?> declaration, String source, io.dropwizard.testing.DropwizardTestSupport<?> support, ClientSupport client) Create stored app. -
Method Summary
-
Constructor Details
-
StoredReusableApp
public StoredReusableApp(Class<?> declaration, String source, io.dropwizard.testing.DropwizardTestSupport<?> support, ClientSupport client) Create stored app.- Parameters:
declaration- declaration test classsource- declaration source descriptionsupport- dropwizard test supportclient- client
-
-
Method Details
-
getDeclaration
- Returns:
- base test class where extension was declared
-
getSource
- Returns:
- declaration source (base class + annotation or field name)
-
getSupport
public io.dropwizard.testing.DropwizardTestSupport<?> getSupport()- Returns:
- reusable support object
-
getClient
- Returns:
- reusable client instance
-
close
- Specified by:
closein interfaceorg.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource- Throws:
Exception
-
toString
-