Package ru.curs.celestaunit
Class CelestaUnitExtension
- java.lang.Object
-
- ru.curs.celestaunit.CelestaUnitExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback
,org.junit.jupiter.api.extension.AfterEachCallback
,org.junit.jupiter.api.extension.BeforeAllCallback
,org.junit.jupiter.api.extension.BeforeEachCallback
,org.junit.jupiter.api.extension.Extension
,org.junit.jupiter.api.extension.ParameterResolver
public final class CelestaUnitExtension extends Object implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.ParameterResolver, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
Extension class for JUnit5 tests.Creates Celesta using Score Path parameter and H2 embedded in-memory database.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CelestaUnitExtension.Builder
Builder for CelestaUnitExtension, that allows to override defaults.
-
Constructor Summary
Constructors Constructor Description CelestaUnitExtension()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
afterAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
void
afterEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
void
beforeAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
void
beforeEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
static CelestaUnitExtension.Builder
builder()
Deprecated.UseCelestaTest
annotation parameters instead.Object
resolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
boolean
supportsParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
-
-
-
Method Detail
-
builder
@Deprecated public static CelestaUnitExtension.Builder builder()
Deprecated.UseCelestaTest
annotation parameters instead.Returns builder for CelestaUnitExtension instance, allowing to override default settings.
-
afterAll
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
- Specified by:
afterAll
in interfaceorg.junit.jupiter.api.extension.AfterAllCallback
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
- Specified by:
beforeAll
in interfaceorg.junit.jupiter.api.extension.BeforeAllCallback
-
supportsParameter
public boolean supportsParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
- Specified by:
supportsParameter
in interfaceorg.junit.jupiter.api.extension.ParameterResolver
-
resolveParameter
public Object resolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
- Specified by:
resolveParameter
in interfaceorg.junit.jupiter.api.extension.ParameterResolver
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
- Specified by:
beforeEach
in interfaceorg.junit.jupiter.api.extension.BeforeEachCallback
-
afterEach
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
- Specified by:
afterEach
in interfaceorg.junit.jupiter.api.extension.AfterEachCallback
-
-