public class ResourceInjectionEnricher extends Object implements TestEnricher
Constructor and Description |
---|
ResourceInjectionEnricher() |
Modifier and Type | Method and Description |
---|---|
void |
enrich(Object testCase) |
protected Context |
getContainerContext()
Obtains the appropriate context for the test.
|
protected String |
getResourceName(Field field) |
protected String |
getResourceName(javax.annotation.Resource resource) |
protected void |
injectClass(Object testCase) |
protected Object |
lookup(String jndiName) |
Object[] |
resolve(Method method) |
protected Object |
resolveResource(AnnotatedElement element)
Looks up the JNDI resource for any given annotated element.
|
protected String |
tryResourceLookup(javax.annotation.Resource resource) |
public void enrich(Object testCase)
enrich
in interface TestEnricher
public Object[] resolve(Method method)
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
protected String getResourceName(javax.annotation.Resource resource)
protected String tryResourceLookup(javax.annotation.Resource resource)
Copyright © 2018 JBoss by Red Hat. All rights reserved.