public class EJBInjectionEnricher extends Object implements TestEnricher
| Constructor and Description |
|---|
EJBInjectionEnricher() |
| Modifier and Type | Method and Description |
|---|---|
protected Context |
createContext() |
void |
enrich(Object testCase)
Extension point to add features to the a Test class instance.
IE. |
protected List<Field> |
getFieldsWithAnnotation(Class<?> clazz,
Class<? extends Annotation> annotation)
Obtains all field in the specified class which contain the specified annotation
|
protected void |
injectClass(Object testCase) |
protected Object |
lookupEJB(String[] jndiNames) |
Object[] |
resolve(Method method)
Extension point to add features to the test method arguments.
IE. |
protected String[] |
resolveJNDINames(Class<?> fieldType,
String mappedName,
String beanName)
Resolves the JNDI name of the given field.
|
public void enrich(Object testCase)
TestEnricherenrich in interface TestEnrichertestCase - The test case instancepublic Object[] resolve(Method method)
TestEnricherTestEnricher.resolve in interface TestEnricherprotected List<Field> getFieldsWithAnnotation(Class<?> clazz, Class<? extends Annotation> annotation) throws IllegalArgumentException
clazz - annotation - IllegalArgumentException - If either argument is not specifiedprotected void injectClass(Object testCase)
protected String[] resolveJNDINames(Class<?> fieldType, String mappedName, String beanName)
IllegalStateException
will be thrown.fieldType - annotated field which JNDI name should be resolved.mappedName - Value of EJB's mappedName attribute.beanName - Value of EJB's beanName attribute.Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.