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 aLocalMemoryRepository
and registers it with theRepositoryManager
singleton and theSimuLizarTestExtensionCommons.SIMULIZAR
store namespace. The repository is removed after test execution. Furthermore, this extension supports writing test cases by filtering out a singleExperimentRun
from the repository to be provided as parameter.
-
-
Constructor Summary
Constructors Constructor Description ProvideEDP2RepositoryExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterEach(org.junit.jupiter.api.extension.ExtensionContext context)
void
beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
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
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
- Specified by:
beforeEach
in interfaceorg.junit.jupiter.api.extension.BeforeEachCallback
- Throws:
Exception
-
afterEach
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
- 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
-
-