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 final org.junit.jupiter.api.extension.ExtensionContext.Namespace
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 a PredicateFactory-based annotation the appropriate factory is used to create the filter predicate.
    • loadInstance

      public static <T> T loadInstance(Class<? extends Supplier<T>> supplierClass, org.junit.jupiter.api.extension.ExtensionContext context)