Class ProvideEDP2RepositoryExtension
java.lang.Object
org.palladiosimulator.simulizar.test.commons.extension.ProvideEDP2RepositoryExtension
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterEachCallback
,org.junit.jupiter.api.extension.BeforeEachCallback
,org.junit.jupiter.api.extension.Extension
,org.junit.jupiter.api.extension.ParameterResolver
public class ProvideEDP2RepositoryExtension
extends Object
implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.ParameterResolver
This JUnit 5 Extension support the creation of simulation tests. Before test execution it creates
a
LocalMemoryRepository
and registers it with the RepositoryManager
singleton and
the SimuLizarTestExtensionCommons.SIMULIZAR
store namespace. The repository is removed
after test execution.
Furthermore, this extension supports writing test cases by filtering out a single
ExperimentRun
from the repository to be provided as parameter.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterEach
(org.junit.jupiter.api.extension.ExtensionContext context) void
beforeEach
(org.junit.jupiter.api.extension.ExtensionContext context) 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)
-
Constructor Details
-
ProvideEDP2RepositoryExtension
public ProvideEDP2RepositoryExtension()
-
-
Method Details
-
beforeEach
- Specified by:
beforeEach
in interfaceorg.junit.jupiter.api.extension.BeforeEachCallback
- Throws:
Exception
-
afterEach
- Specified by:
afterEach
in interfaceorg.junit.jupiter.api.extension.AfterEachCallback
- Throws:
Exception
-
supportsParameter
public boolean supportsParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws org.junit.jupiter.api.extension.ParameterResolutionException - Specified by:
supportsParameter
in interfaceorg.junit.jupiter.api.extension.ParameterResolver
- Throws:
org.junit.jupiter.api.extension.ParameterResolutionException
-
resolveParameter
public Object resolveParameter(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws org.junit.jupiter.api.extension.ParameterResolutionException - Specified by:
resolveParameter
in interfaceorg.junit.jupiter.api.extension.ParameterResolver
- Throws:
org.junit.jupiter.api.extension.ParameterResolutionException
-