Class SimuLizarTestExtensionCommons
java.lang.Object
org.palladiosimulator.simulizar.test.commons.extension.SimuLizarTestExtensionCommons
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.junit.jupiter.api.extension.ExtensionContext.Namespace
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindModelEntity
(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) Resolves a PCMResourceSetPartition from the extensionContext and looks for objects conforming to the parameter context.static <T> Optional<T>
getObjectFromStore
(org.junit.jupiter.api.extension.ExtensionContext extensionContext, Class<T> clazz) Retrieves an object from the cached store.getParameterFilterPredicate
(org.junit.jupiter.api.extension.ParameterContext parameterContext) Returns the predicate suitable for parameter lookup based on the parameter context.static <T> T
loadInstance
(Class<? extends Supplier<T>> supplierClass, org.junit.jupiter.api.extension.ExtensionContext context) static <T> void
putObjectIntoStore
(org.junit.jupiter.api.extension.ExtensionContext extensionContext, Class<? super T> key, T object) Retrieves an object from the cached store.
-
Field Details
-
SIMULIZAR
public static final org.junit.jupiter.api.extension.ExtensionContext.Namespace SIMULIZAR
-
-
Constructor Details
-
SimuLizarTestExtensionCommons
public SimuLizarTestExtensionCommons()
-
-
Method Details
-
getObjectFromStore
public static <T> Optional<T> getObjectFromStore(org.junit.jupiter.api.extension.ExtensionContext extensionContext, Class<T> clazz) Retrieves an object from the cached store. -
putObjectIntoStore
public static <T> void putObjectIntoStore(org.junit.jupiter.api.extension.ExtensionContext extensionContext, Class<? super T> key, T object) Retrieves an object from the cached store. -
findModelEntity
public static Optional<Object> findModelEntity(org.junit.jupiter.api.extension.ParameterContext parameterContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) Resolves a PCMResourceSetPartition from the extensionContext and looks for objects conforming to the parameter context. -
getParameterFilterPredicate
public static Predicate<Object> getParameterFilterPredicate(org.junit.jupiter.api.extension.ParameterContext parameterContext) Returns the predicate suitable for parameter lookup based on the parameter context. If the parameter is annotated with aPredicateFactory
-based annotation the appropriate factory is used to create the filter predicate. -
loadInstance
-