Package de.tum.in.test.api.jupiter
Class JupiterTestGuard
java.lang.Object
de.tum.in.test.api.jupiter.JupiterTestGuard
- All Implemented Interfaces:
org.junit.jupiter.api.DisplayNameGenerator,org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.InvocationInterceptor
@API(status=INTERNAL)
public final class JupiterTestGuard
extends java.lang.Object
implements org.junit.jupiter.api.extension.InvocationInterceptor, org.junit.jupiter.api.DisplayNameGenerator
This class' main purpose is to guard the
HiddenTests execution and
evaluate the Deadline.- Author:
- Christian Femers
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description JupiterTestGuard() -
Method Summary
Modifier and Type Method Description java.lang.StringgenerateDisplayNameForClass(java.lang.Class<?> testClass)java.lang.StringgenerateDisplayNameForMethod(java.lang.Class<?> testClass, java.lang.reflect.Method testMethod)java.lang.StringgenerateDisplayNameForNestedClass(java.lang.Class<?> nestedClass)voidinterceptAfterAllMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)voidinterceptAfterEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)voidinterceptBeforeAllMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)voidinterceptBeforeEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)voidinterceptDynamicTest(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ExtensionContext extensionContext)<T> TinterceptTestClassConstructor(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Constructor<T>> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)<T> TinterceptTestFactoryMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)voidinterceptTestMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)voidinterceptTestTemplateMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
-
Constructor Details
-
JupiterTestGuard
public JupiterTestGuard()
-
-
Method Details
-
interceptDynamicTest
public void interceptDynamicTest(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable- Specified by:
interceptDynamicTestin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
java.lang.Throwable
-
interceptTestFactoryMethod
public <T> T interceptTestFactoryMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable- Specified by:
interceptTestFactoryMethodin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
java.lang.Throwable
-
interceptTestMethod
public void interceptTestMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable- Specified by:
interceptTestMethodin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
java.lang.Throwable
-
interceptTestTemplateMethod
public void interceptTestTemplateMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable- Specified by:
interceptTestTemplateMethodin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
java.lang.Throwable
-
interceptTestClassConstructor
public <T> T interceptTestClassConstructor(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Constructor<T>> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable- Specified by:
interceptTestClassConstructorin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
java.lang.Throwable
-
interceptBeforeEachMethod
public void interceptBeforeEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable- Specified by:
interceptBeforeEachMethodin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
java.lang.Throwable
-
interceptBeforeAllMethod
public void interceptBeforeAllMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable- Specified by:
interceptBeforeAllMethodin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
java.lang.Throwable
-
interceptAfterEachMethod
public void interceptAfterEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable- Specified by:
interceptAfterEachMethodin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
java.lang.Throwable
-
interceptAfterAllMethod
public void interceptAfterAllMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<java.lang.reflect.Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws java.lang.Throwable- Specified by:
interceptAfterAllMethodin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
java.lang.Throwable
-
generateDisplayNameForClass
public java.lang.String generateDisplayNameForClass(java.lang.Class<?> testClass)- Specified by:
generateDisplayNameForClassin interfaceorg.junit.jupiter.api.DisplayNameGenerator
-
generateDisplayNameForNestedClass
public java.lang.String generateDisplayNameForNestedClass(java.lang.Class<?> nestedClass)- Specified by:
generateDisplayNameForNestedClassin interfaceorg.junit.jupiter.api.DisplayNameGenerator
-
generateDisplayNameForMethod
public java.lang.String generateDisplayNameForMethod(java.lang.Class<?> testClass, java.lang.reflect.Method testMethod)- Specified by:
generateDisplayNameForMethodin interfaceorg.junit.jupiter.api.DisplayNameGenerator
-