Package net.jqwik.api.lifecycle
Interface AfterContainerHook
-
- All Superinterfaces:
LifecycleHook
- All Known Subinterfaces:
AroundContainerHook
@API(status=EXPERIMENTAL, since="1.2.4") public interface AfterContainerHook extends LifecycleHook
Implement this hook to define behaviour for a container (class or whole test suite) that should be run exactly once after of its property methods and child containers.
-
-
Field Summary
Fields Modifier and Type Field Description static AfterContainerHook
DO_NOTHING
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
afterContainer(ContainerLifecycleContext context)
The code of this method will be run exactly once after all property methods and child containers.default int
afterContainerProximity()
The higher the value, the closer to the actual property methods, i.e. the earlier it will be run.default int
compareTo(AfterContainerHook other)
-
Methods inherited from interface net.jqwik.api.lifecycle.LifecycleHook
appliesTo, propagateTo
-
-
-
-
Field Detail
-
DO_NOTHING
@API(status=INTERNAL) static final AfterContainerHook DO_NOTHING
-
-
Method Detail
-
afterContainer
void afterContainer(ContainerLifecycleContext context) throws java.lang.Throwable
The code of this method will be run exactly once after all property methods and child containers.- Parameters:
context
- The container's context object- Throws:
java.lang.Throwable
-
afterContainerProximity
default int afterContainerProximity()
The higher the value, the closer to the actual property methods, i.e. the earlier it will be run. Default value is 0.Values greater than -10 will make it run before methods annotated with AfterContainer, values smaller than -10 will make it run after.
- Returns:
- an integer value
-
compareTo
@API(status=INTERNAL) default int compareTo(AfterContainerHook other)
-
-