public class ResourceInjectionEnricher extends Object implements TestEnricher
Constructor and Description |
---|
ResourceInjectionEnricher() |
Modifier and Type | Method and Description |
---|---|
void |
enrich(Object testCase)
Extension point to add features to the a Test class instance.
IE. |
protected Context |
getContainerContext()
Obtains the appropriate context for the test.
|
protected String |
getResourceName(Field field) |
protected String |
getResourceName(Resource resource) |
protected void |
injectClass(Object testCase) |
protected Object |
lookup(String jndiName) |
Object[] |
resolve(Method method)
Extension point to add features to the test method arguments.
IE. |
protected Object |
resolveResource(AnnotatedElement element)
Looks up the JNDI resource for any given annotated element.
|
public void enrich(Object testCase)
TestEnricher
enrich
in interface TestEnricher
testCase
- The test case instancepublic Object[] resolve(Method method)
TestEnricher
TestEnricher
.resolve
in interface TestEnricher
protected void injectClass(Object testCase)
protected Object resolveResource(AnnotatedElement element) throws Exception
element
- any annotated element (field, method, etc.)Exception
protected Context getContainerContext() throws NamingException
NamingException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.