Package org.junit.jupiter.params
Class ParameterizedClassContext
- java.lang.Object
-
- org.junit.jupiter.params.ParameterizedClassContext
-
- All Implemented Interfaces:
ParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
class ParameterizedClassContext extends java.lang.Object implements ParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classParameterizedClassContext.InjectionType
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ArgumentSetLifecycleMethod>afterMethodsprivate ParameterizedClassannotationprivate java.util.List<ArgumentSetLifecycleMethod>beforeMethodsprivate ParameterizedClassContext.InjectionTypeinjectionTypeprivate ResolverFacaderesolverFacadeprivate java.lang.Class<?>testClassprivate org.junit.jupiter.api.TestInstance.LifecycletestInstanceLifecycle
-
Constructor Summary
Constructors Constructor Description ParameterizedClassContext(java.lang.Class<?> testClass, ParameterizedClass annotation, org.junit.jupiter.api.TestInstance.Lifecycle testInstanceLifecycle)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.jupiter.api.extension.ClassTemplateInvocationContextcreateInvocationContext(ParameterizedInvocationNameFormatter formatter, Arguments arguments, int invocationIndex)private static <A extends java.lang.annotation.Annotation>
java.util.List<ArgumentSetLifecycleMethod>findLifecycleMethodsAndAssertStaticAndNonPrivate(java.lang.Class<?> testClass, org.junit.jupiter.api.TestInstance.Lifecycle testInstanceLifecycle, org.junit.platform.commons.support.HierarchyTraversalMode traversalMode, java.lang.Class<A> annotationType, java.util.function.Predicate<A> injectArgumentsPredicate, ResolverFacade resolverFacade)private static java.util.List<java.lang.reflect.Field>findParameterAnnotatedFields(java.lang.Class<?> clazz)(package private) java.util.List<ArgumentSetLifecycleMethod>getAfterMethods()java.lang.Class<?>getAnnotatedElement()ParameterizedClassgetAnnotation()private static <A extends java.lang.annotation.Annotation>
AgetAnnotation(java.lang.reflect.Method method, java.lang.Class<A> annotationType)ArgumentCountValidationModegetArgumentCountValidationMode()(package private) java.util.List<ArgumentSetLifecycleMethod>getBeforeMethods()java.lang.StringgetDisplayNamePattern()(package private) ParameterizedClassContext.InjectionTypegetInjectionType()ResolverFacadegetResolverFacade()java.lang.Class<?>getTestClass()(package private) org.junit.jupiter.api.TestInstance.LifecyclegetTestInstanceLifecycle()booleanisAllowingZeroInvocations()booleanisAutoClosingArguments()-
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.params.ParameterizedDeclarationContext
getAnnotationName
-
-
-
-
Field Detail
-
testClass
private final java.lang.Class<?> testClass
-
annotation
private final ParameterizedClass annotation
-
testInstanceLifecycle
private final org.junit.jupiter.api.TestInstance.Lifecycle testInstanceLifecycle
-
resolverFacade
private final ResolverFacade resolverFacade
-
injectionType
private final ParameterizedClassContext.InjectionType injectionType
-
beforeMethods
private final java.util.List<ArgumentSetLifecycleMethod> beforeMethods
-
afterMethods
private final java.util.List<ArgumentSetLifecycleMethod> afterMethods
-
-
Constructor Detail
-
ParameterizedClassContext
ParameterizedClassContext(java.lang.Class<?> testClass, ParameterizedClass annotation, org.junit.jupiter.api.TestInstance.Lifecycle testInstanceLifecycle)
-
-
Method Detail
-
findParameterAnnotatedFields
private static java.util.List<java.lang.reflect.Field> findParameterAnnotatedFields(java.lang.Class<?> clazz)
-
getTestClass
public java.lang.Class<?> getTestClass()
- Specified by:
getTestClassin interfaceParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
-
getAnnotation
public ParameterizedClass getAnnotation()
- Specified by:
getAnnotationin interfaceParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
-
getAnnotatedElement
public java.lang.Class<?> getAnnotatedElement()
- Specified by:
getAnnotatedElementin interfaceParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
-
getDisplayNamePattern
public java.lang.String getDisplayNamePattern()
- Specified by:
getDisplayNamePatternin interfaceParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
-
isAutoClosingArguments
public boolean isAutoClosingArguments()
- Specified by:
isAutoClosingArgumentsin interfaceParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
-
isAllowingZeroInvocations
public boolean isAllowingZeroInvocations()
- Specified by:
isAllowingZeroInvocationsin interfaceParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
-
getArgumentCountValidationMode
public ArgumentCountValidationMode getArgumentCountValidationMode()
- Specified by:
getArgumentCountValidationModein interfaceParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
-
getResolverFacade
public ResolverFacade getResolverFacade()
- Specified by:
getResolverFacadein interfaceParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
-
createInvocationContext
public org.junit.jupiter.api.extension.ClassTemplateInvocationContext createInvocationContext(ParameterizedInvocationNameFormatter formatter, Arguments arguments, int invocationIndex)
- Specified by:
createInvocationContextin interfaceParameterizedDeclarationContext<org.junit.jupiter.api.extension.ClassTemplateInvocationContext>
-
getTestInstanceLifecycle
org.junit.jupiter.api.TestInstance.Lifecycle getTestInstanceLifecycle()
-
getInjectionType
ParameterizedClassContext.InjectionType getInjectionType()
-
getBeforeMethods
java.util.List<ArgumentSetLifecycleMethod> getBeforeMethods()
-
getAfterMethods
java.util.List<ArgumentSetLifecycleMethod> getAfterMethods()
-
findLifecycleMethodsAndAssertStaticAndNonPrivate
private static <A extends java.lang.annotation.Annotation> java.util.List<ArgumentSetLifecycleMethod> findLifecycleMethodsAndAssertStaticAndNonPrivate(java.lang.Class<?> testClass, org.junit.jupiter.api.TestInstance.Lifecycle testInstanceLifecycle, org.junit.platform.commons.support.HierarchyTraversalMode traversalMode, java.lang.Class<A> annotationType, java.util.function.Predicate<A> injectArgumentsPredicate, ResolverFacade resolverFacade)
-
getAnnotation
private static <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.reflect.Method method, java.lang.Class<A> annotationType)
-
-