
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(jakarta.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(jakarta.annotation.Resource resource) |
public void enrich(Object testCase)
enrich in interface TestEnricherpublic Object[] resolve(Method method)
resolve in interface TestEnricherprotected void injectClass(Object testCase)
protected Object resolveResource(AnnotatedElement element) throws Exception
element - any annotated element (field, method, etc.)Exceptionprotected Context getContainerContext() throws NamingException
NamingExceptionprotected String getResourceName(jakarta.annotation.Resource resource)
protected String tryResourceLookup(jakarta.annotation.Resource resource)
Copyright © 2020 JBoss by Red Hat. All rights reserved.