- java.lang.Object
-
- org.junitpioneer.jupiter.params.DisableIfArgumentExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.InvocationInterceptor
class DisableIfArgumentExtension extends java.lang.Object implements org.junit.jupiter.api.extension.InvocationInterceptor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classDisableIfArgumentExtension.ArgumentChecker
-
Constructor Summary
Constructors Constructor Description DisableIfArgumentExtension()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidcheckRequiredAnnotations(java.lang.reflect.Method testMethod)private java.lang.ObjectfindArgument(java.lang.reflect.Method testMethod, java.util.List<java.lang.Object> arguments, DisableIfArgument annotation, int index)private java.lang.ObjectfindArgumentByIndex(java.util.List<java.lang.Object> arguments, int index)private java.lang.ObjectfindArgumentByName(java.lang.reflect.Method testMethod, java.util.List<java.lang.Object> arguments, java.lang.String name)private intfindParameterIndexFromName(java.lang.reflect.Method testMethod, java.lang.String name)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)private static org.junit.jupiter.api.extension.ExtensionConfigurationExceptioninvalidInputs(java.lang.Class<?> annotationClass)private static voidverifyNonEmptyInputs(DisableIfAllArguments annotation)private static voidverifyNonEmptyInputs(DisableIfAnyArgument annotation)private static voidverifyNonEmptyInputs(DisableIfArgument annotation)private voidverifyValidIndex(java.util.List<java.lang.Object> arguments, int index)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor
interceptAfterAllMethod, interceptAfterEachMethod, interceptBeforeAllMethod, interceptBeforeEachMethod, interceptDynamicTest, interceptDynamicTest, interceptTestClassConstructor, interceptTestFactoryMethod, interceptTestMethod
-
-
-
-
Method Detail
-
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
-
checkRequiredAnnotations
private static void checkRequiredAnnotations(java.lang.reflect.Method testMethod)
-
verifyNonEmptyInputs
private static void verifyNonEmptyInputs(DisableIfAllArguments annotation)
-
verifyNonEmptyInputs
private static void verifyNonEmptyInputs(DisableIfAnyArgument annotation)
-
verifyNonEmptyInputs
private static void verifyNonEmptyInputs(DisableIfArgument annotation)
-
invalidInputs
private static org.junit.jupiter.api.extension.ExtensionConfigurationException invalidInputs(java.lang.Class<?> annotationClass)
-
findArgument
private java.lang.Object findArgument(java.lang.reflect.Method testMethod, java.util.List<java.lang.Object> arguments, DisableIfArgument annotation, int index)
-
findArgumentByName
private java.lang.Object findArgumentByName(java.lang.reflect.Method testMethod, java.util.List<java.lang.Object> arguments, java.lang.String name)
-
findParameterIndexFromName
private int findParameterIndexFromName(java.lang.reflect.Method testMethod, java.lang.String name)
-
findArgumentByIndex
private java.lang.Object findArgumentByIndex(java.util.List<java.lang.Object> arguments, int index)
-
verifyValidIndex
private void verifyValidIndex(java.util.List<java.lang.Object> arguments, int index)
-
-