Class SimuLizarTestExtensionCommons


  • public final class SimuLizarTestExtensionCommons
    extends Object
    • Field Detail

      • SIMULIZAR

        public static final org.junit.jupiter.api.extension.ExtensionContext.Namespace SIMULIZAR
    • Constructor Detail

      • SimuLizarTestExtensionCommons

        public SimuLizarTestExtensionCommons()
    • 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 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)