Interface BeforeContainerHook

  • All Superinterfaces:
    All Known Subinterfaces:
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    public interface BeforeContainerHook
    extends LifecycleHook
    Implement this hook to define behaviour for a container (class or whole test suite) that should be run exactly once before any of its property methods and child containers.
    • Method Detail

      • beforeContainer

        void beforeContainer​(ContainerLifecycleContext context)
                      throws java.lang.Throwable
        The code of this method will be run exactly once before any property method or child container.
        context - The container's context object
      • beforeContainerProximity

        default int beforeContainerProximity()
        The higher the value, the closer to the actual property methods, i.e. the later it will be run. Default value is 0.

        Values greater than -10 will make it run after methods annotated with BeforeContainer, values smaller than -10 will make it run before.

        an integer value