Class SimuLizarTestExtensionCommons
- java.lang.Object
-
- org.palladiosimulator.simulizar.test.commons.extension.SimuLizarTestExtensionCommons
-
public final class SimuLizarTestExtensionCommons extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static org.junit.jupiter.api.extension.ExtensionContext.Namespace
SIMULIZAR
-
Constructor Summary
Constructors Constructor Description SimuLizarTestExtensionCommons()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.static <T> Optional<T>
getObjectFromStore(org.junit.jupiter.api.extension.ExtensionContext extensionContext, Class<T> clazz)
Retrieves an object from the cached store.static Predicate<Object>
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.
-
-
-
Method Detail
-
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.
-
-