Class DisableIfArgumentExtension
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 Object
implements org.junit.jupiter.api.extension.InvocationInterceptor
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor
org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcheckRequiredAnnotations(Method testMethod) private ObjectfindArgument(Method testMethod, List<Object> arguments, DisableIfArgument annotation, int index) private ObjectfindArgumentByIndex(List<Object> arguments, int index) private ObjectfindArgumentByName(Method testMethod, List<Object> arguments, String name) private intfindParameterIndexFromName(Method testMethod, String name) voidinterceptTestTemplateMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) private static org.junit.jupiter.api.extension.ExtensionConfigurationExceptioninvalidInputs(Class<?> annotationClass) private static voidverifyNonEmptyInputs(DisableIfAllArguments annotation) private static voidverifyNonEmptyInputs(DisableIfAnyArgument annotation) private static voidverifyNonEmptyInputs(DisableIfArgument annotation) private voidverifyValidIndex(List<Object> arguments, int index) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor
interceptAfterAllMethod, interceptAfterEachMethod, interceptBeforeAllMethod, interceptBeforeEachMethod, interceptDynamicTest, interceptDynamicTest, interceptTestClassConstructor, interceptTestFactoryMethod, interceptTestMethod
-
Constructor Details
-
DisableIfArgumentExtension
DisableIfArgumentExtension()
-
-
Method Details
-
interceptTestTemplateMethod
public void interceptTestTemplateMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Throwable - Specified by:
interceptTestTemplateMethodin interfaceorg.junit.jupiter.api.extension.InvocationInterceptor- Throws:
Throwable
-
checkRequiredAnnotations
-
verifyNonEmptyInputs
-
verifyNonEmptyInputs
-
verifyNonEmptyInputs
-
invalidInputs
private static org.junit.jupiter.api.extension.ExtensionConfigurationException invalidInputs(Class<?> annotationClass) -
findArgument
private Object findArgument(Method testMethod, List<Object> arguments, DisableIfArgument annotation, int index) -
findArgumentByName
-
findParameterIndexFromName
-
findArgumentByIndex
-
verifyValidIndex
-