|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.arquillian.testenricher.resource.ResourceInjectionEnricher
public class ResourceInjectionEnricher
Enricher that provide @Resource field and method argument injection.
Field Resources will only be injected if the current value is NULL or primitive default value.
Constructor Summary | |
---|---|
ResourceInjectionEnricher()
|
Method Summary | |
---|---|
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(javax.annotation.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceInjectionEnricher()
Method Detail |
---|
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 Object lookup(String jndiName) throws Exception
Exception
protected Context getContainerContext() throws NamingException
NamingException
protected String getResourceName(Field field)
protected String getResourceName(javax.annotation.Resource resource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |