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

    Nested classes/interfaces inherited from interface org.junit.jupiter.api.DisplayNameGenerator

    org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores, org.junit.jupiter.api.DisplayNameGenerator.Standard

    Nested classes/interfaces inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor

    org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T extends java.lang.Object>
  • Constructor Summary

    Constructors 
    Constructor Description
    JupiterTestGuard()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String generateDisplayNameForClass​(java.lang.Class<?> testClass)  
    java.lang.String generateDisplayNameForMethod​(java.lang.Class<?> testClass, java.lang.reflect.Method testMethod)  
    java.lang.String generateDisplayNameForNestedClass​(java.lang.Class<?> nestedClass)  
    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)  
    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)  
    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)  
    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)  
    void interceptDynamicTest​(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<java.lang.Void> invocation, org.junit.jupiter.api.extension.ExtensionContext extensionContext)  
    <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)  
    <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)  
    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)  
    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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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:
      interceptDynamicTest in interface org.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:
      interceptTestFactoryMethod in interface org.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:
      interceptTestMethod in interface org.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:
      interceptTestTemplateMethod in interface org.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:
      interceptTestClassConstructor in interface org.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:
      interceptBeforeEachMethod in interface org.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:
      interceptBeforeAllMethod in interface org.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:
      interceptAfterEachMethod in interface org.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:
      interceptAfterAllMethod in interface org.junit.jupiter.api.extension.InvocationInterceptor
      Throws:
      java.lang.Throwable
    • generateDisplayNameForClass

      public java.lang.String generateDisplayNameForClass​(java.lang.Class<?> testClass)
      Specified by:
      generateDisplayNameForClass in interface org.junit.jupiter.api.DisplayNameGenerator
    • generateDisplayNameForNestedClass

      public java.lang.String generateDisplayNameForNestedClass​(java.lang.Class<?> nestedClass)
      Specified by:
      generateDisplayNameForNestedClass in interface org.junit.jupiter.api.DisplayNameGenerator
    • generateDisplayNameForMethod

      public java.lang.String generateDisplayNameForMethod​(java.lang.Class<?> testClass, java.lang.reflect.Method testMethod)
      Specified by:
      generateDisplayNameForMethod in interface org.junit.jupiter.api.DisplayNameGenerator