Class TestSetupUtils.ClosableWrapper
- java.lang.Object
-
- ru.vyarus.dropwizard.guice.test.util.TestSetupUtils.ClosableWrapper
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
- Enclosing class:
- TestSetupUtils
public static class TestSetupUtils.ClosableWrapper extends java.lang.Object implements org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
Wrapper class forAutoCloseable
objects to grant automatic closing inside junit store.
-
-
Constructor Summary
Constructors Constructor Description ClosableWrapper(java.lang.AutoCloseable obj)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
create(java.lang.Object obj)
-
-
-
Method Detail
-
close
public void close() throws java.lang.Throwable
- Specified by:
close
in interfaceorg.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
- Throws:
java.lang.Throwable
-
create
public static org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource create(java.lang.Object obj)
- Parameters:
obj
- closable object- Returns:
- either object as is if it is already closable resource or wrapped object
-
-