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 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 Summary
Constructors Constructor Description StoredReusableApp(java.lang.Class<?> declaration, java.lang.String source, io.dropwizard.testing.DropwizardTestSupport<?> support, ClientSupport client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ClientSupport
getClient()
java.lang.Class<?>
getDeclaration()
java.lang.String
getSource()
io.dropwizard.testing.DropwizardTestSupport<?>
getSupport()
java.lang.String
toString()
-
-
-
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 interfaceorg.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
- Throws:
java.lang.Exception
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-