Arquillian TestEnricher EJB 1.0.0.CR5

org.jboss.arquillian.testenricher.ejb
Class EJBInjectionEnricher

java.lang.Object
  extended by org.jboss.arquillian.testenricher.ejb.EJBInjectionEnricher
All Implemented Interfaces:
TestEnricher

public class EJBInjectionEnricher
extends Object
implements TestEnricher

Enricher that provide EJB class and setter method injection.

Version:
$Revision: $
Author:
Aslak Knutsen

Constructor Summary
EJBInjectionEnricher()
           
 
Method Summary
protected  Context createContext()
           
 void enrich(Object testCase)
           
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(Class<?> fieldType, String mappedName)
           
 Object[] resolve(Method method)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBInjectionEnricher

public EJBInjectionEnricher()
Method Detail

enrich

public void enrich(Object testCase)
Specified by:
enrich in interface TestEnricher

resolve

public Object[] resolve(Method method)
Specified by:
resolve in interface TestEnricher

getFieldsWithAnnotation

protected List<Field> getFieldsWithAnnotation(Class<?> clazz,
                                              Class<? extends Annotation> annotation)
                                       throws IllegalArgumentException
Obtains all field in the specified class which contain the specified annotation

Parameters:
clazz -
annotation -
Returns:
Throws:
IllegalArgumentException - If either argument is not specified

injectClass

protected void injectClass(Object testCase)

lookupEJB

protected Object lookupEJB(Class<?> fieldType,
                           String mappedName)
                    throws Exception
Throws:
Exception

createContext

protected Context createContext()
                         throws Exception
Throws:
Exception

Arquillian TestEnricher EJB 1.0.0.CR5

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.