Package org.verifyica.api
Interface ClassInterceptor
public interface ClassInterceptor
Interface to implement ClassInterceptor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Predicate<ClassContext> Predicate to accept any ClassContext -
Method Summary
Modifier and TypeMethodDescriptiondefault voiddestroy(EngineContext engineContext) ClassInterceptor destroydefault voidinitialize(EngineContext engineContext) ClassInterceptor initializedefault voidonDestroy(ClassContext classContext) ClassInterceptor onDestroy callbackdefault voidpostAfterAll(ArgumentContext argumentContext, Throwable throwable) ClassInterceptor postAfterAll callbackdefault voidpostAfterEach(ArgumentContext argumentContext, Throwable throwable) ClassInterceptor postAfterEach callbackdefault voidpostBeforeAll(ArgumentContext argumentContext, Throwable throwable) ClassInterceptor postBeforeAll callbackdefault voidpostBeforeEach(ArgumentContext argumentContext, Throwable throwable) ClassInterceptor postBeforeEach callbackdefault voidpostConclude(ClassContext classContext, Throwable throwable) ClassInterceptor postConclude callbackdefault voidpostInstantiate(EngineContext engineContext, Class<?> testClass, Object testInstance, Throwable throwable) ClassInterceptor postInstantiate callbackdefault voidpostPrepare(ClassContext classContext, Throwable throwable) ClassInterceptor postPrepare callbackdefault voidpostTest(ArgumentContext argumentContext, Method testMethod, Throwable throwable) ClassInterceptor postTest callbackdefault voidpreAfterAll(ArgumentContext argumentContext) ClassInterceptor preAfterAll callbackdefault voidpreAfterEach(ArgumentContext argumentContext) ClassInterceptor preAfterEach callbackdefault voidpreBeforeAll(ArgumentContext argumentContext) ClassInterceptor preBeforeAll callbackdefault voidpreBeforeEach(ArgumentContext argumentContext) ClassInterceptor preBeforeEach callbackdefault voidpreConclude(ClassContext classContext) ClassInterceptor preConclude callbackdefault Predicate<ClassContext> ClassInterceptor Predicatedefault voidpreInstantiate(EngineContext engineContext, Class<?> testClass) ClassInterceptor preInstantiate callbackdefault voidprePrepare(ClassContext classContext) ClassInterceptor prePrepare callbackdefault voidpreTest(ArgumentContext argumentContext, Method testMethod) ClassInterceptor preTest callbackdefault voidRethrows a Throwable if not null
-
Field Details
-
ACCEPT_ALL
Predicate to accept any ClassContext
-
-
Method Details
-
initialize
ClassInterceptor initialize- Parameters:
engineContext- engineContext- Throws:
Throwable- throwable
-
predicate
ClassInterceptor Predicate- Returns:
- a Predicate
-
preInstantiate
ClassInterceptor preInstantiate callback- Parameters:
engineContext- engineContexttestClass- testClass- Throws:
Throwable- Throwable
-
postInstantiate
default void postInstantiate(EngineContext engineContext, Class<?> testClass, Object testInstance, Throwable throwable) throws Throwable ClassInterceptor postInstantiate callback- Parameters:
engineContext- engineContexttestClass- testClasstestInstance- testInstancethrowable- throwable- Throws:
Throwable- Throwable
-
prePrepare
ClassInterceptor prePrepare callback- Parameters:
classContext- classContext- Throws:
Throwable- Throwable
-
postPrepare
ClassInterceptor postPrepare callback- Parameters:
classContext- classContextthrowable- throwable- Throws:
Throwable- Throwable
-
preBeforeAll
ClassInterceptor preBeforeAll callback- Parameters:
argumentContext- argumentContext- Throws:
Throwable- Throwable
-
postBeforeAll
ClassInterceptor postBeforeAll callback- Parameters:
argumentContext- argumentContextthrowable- throwable- Throws:
Throwable- Throwable
-
preBeforeEach
ClassInterceptor preBeforeEach callback- Parameters:
argumentContext- argumentContext- Throws:
Throwable- Throwable
-
postBeforeEach
ClassInterceptor postBeforeEach callback- Parameters:
argumentContext- argumentContextthrowable- throwable- Throws:
Throwable- Throwable
-
preTest
ClassInterceptor preTest callback- Parameters:
argumentContext- argumentContexttestMethod- testMethod- Throws:
Throwable- Throwable
-
postTest
default void postTest(ArgumentContext argumentContext, Method testMethod, Throwable throwable) throws Throwable ClassInterceptor postTest callback- Parameters:
argumentContext- argumentContexttestMethod- testMethodthrowable- throwable- Throws:
Throwable- Throwable
-
preAfterEach
ClassInterceptor preAfterEach callback- Parameters:
argumentContext- argumentContext- Throws:
Throwable- Throwable
-
postAfterEach
ClassInterceptor postAfterEach callback- Parameters:
argumentContext- argumentContextthrowable- throwable- Throws:
Throwable- Throwable
-
preAfterAll
ClassInterceptor preAfterAll callback- Parameters:
argumentContext- argumentContext- Throws:
Throwable- Throwable
-
postAfterAll
ClassInterceptor postAfterAll callback- Parameters:
argumentContext- argumentContextthrowable- throwable- Throws:
Throwable- Throwable
-
preConclude
ClassInterceptor preConclude callback- Parameters:
classContext- classContext- Throws:
Throwable- Throwable
-
postConclude
ClassInterceptor postConclude callback- Parameters:
classContext- classContextthrowable- throwable- Throws:
Throwable- Throwable
-
onDestroy
ClassInterceptor onDestroy callback- Parameters:
classContext- classContext- Throws:
Throwable- Throwable
-
destroy
ClassInterceptor destroy- Parameters:
engineContext- engineContext- Throws:
Throwable- Throwable
-
rethrow
Rethrows a Throwable if not null- Parameters:
throwable- throwable- Throws:
Throwable- Throwable
-