Class EventAdapter<T extends EventContext>

  • All Implemented Interfaces:
    Event
    Direct Known Subclasses:
    EventDefault

    public abstract class EventAdapter<T extends EventContext>
    extends java.lang.Object
    implements Event
    Adapter class with empty method implementations of the Event interface. Extend this class so you only have to implement the methods that are used. Always provide a proper name for an Event for traceability.
    • Method Detail

      • beforeTest

        public void beforeTest()
        Description copied from interface: Event
        Called before the test run starts. You can for instance cleanup the test environment and/or restart the server under test.
        Specified by:
        beforeTest in interface Event
      • startTest

        public void startTest()
        Description copied from interface: Event
        Called when test run actually starts.
        Specified by:
        startTest in interface Event
      • afterTest

        public void afterTest()
        Description copied from interface: Event
        Called after the test run is done. Use for instance to start creating a report of some sort or remove the test environment.
        Specified by:
        afterTest in interface Event
      • keepAlive

        public void keepAlive()
        Description copied from interface: Event
        Called for each keep alive event for this test run.
        Specified by:
        keepAlive in interface Event
      • abortTest

        public void abortTest()
        Description copied from interface: Event
        Called for test abort.
        Specified by:
        abortTest in interface Event
      • check

        public EventCheck check()
        Description copied from interface: Event
        Called to check test results (for example the requirements are checked). Can be used to have a test run fail or succeed in continuous integration setups.
        Specified by:
        check in interface Event
        Returns:
        even check that indicated a failed or successful run for this event.
      • customEvent

        public void customEvent​(CustomEvent customEvent)
        Description copied from interface: Event
        Called for each custom event, according to the custom even schedule.
        Specified by:
        customEvent in interface Event
        Parameters:
        customEvent - the custom event, use to execute specific behaviour in the event handler
      • getName

        public final java.lang.String getName()
        Specified by:
        getName in interface Event
        Returns:
        name of the test event.
      • setOf

        public static java.util.Set<java.lang.String> setOf​(java.lang.String... items)
        Convenience method for the allowed properties or events.
        Parameters:
        items - the allowed props or events
        Returns:
        unmodifiable and ordered set of items