Class EventTestHelper


  • public abstract class EventTestHelper
    extends Object
    Author:
    Tijs Rademakers, Joram Barrez
    • Constructor Detail

      • EventTestHelper

        public EventTestHelper()
    • Method Detail

      • getEventResource

        public static String getEventResource​(Class<?> type,
                                              String name)
        get a resource location by convention based on a class (type) and a relative resource name. The return value will be the full classpath location of the type, plus a suffix built from the name parameter: EventDeployer.EVENT_RESOURCE_SUFFIXES. The first resource matching a suffix will be returned.
      • getChannelResource

        public static String getChannelResource​(Class<?> type,
                                                String name)
        get a resource location by convention based on a class (type) and a relative resource name. The return value will be the full classpath location of the type, plus a suffix built from the name parameter: EventDeployer.CHANNEL_RESOURCE_SUFFIXES. The first resource matching a suffix will be returned.
      • closeEventRegistryEngines

        public static void closeEventRegistryEngines()
      • assertAndEnsureCleanDb

        public static void assertAndEnsureCleanDb​(EventRegistryEngine eventRegistryEngine)
        Each test is assumed to clean up all DB content it entered. After a test method executed, this method scans all tables to see if the DB is completely clean. It throws AssertionFailed in case the DB is not clean. If the DB is not clean, it is cleaned by performing a create a drop.