public class ArquillianResourceTestEnricher extends java.lang.Object implements TestEnricher
Modifier and Type | Class and Description |
---|---|
static class |
ArquillianResourceTestEnricher.SerializableClassInjection |
static class |
ArquillianResourceTestEnricher.SerializableMethodInjection |
Modifier and Type | Field and Description |
---|---|
private Instance<ServiceLoader> |
loader |
Constructor and Description |
---|
ArquillianResourceTestEnricher() |
Modifier and Type | Method and Description |
---|---|
private void |
checkPresentScopeInjection(java.util.List<java.lang.annotation.Annotation> qualifiers,
java.lang.Class<? extends java.lang.annotation.Annotation> scope) |
void |
enrich(java.lang.Object testCase)
Extension point to add features to the a Test class instance.
IE. |
private java.util.List<java.lang.annotation.Annotation> |
filterAnnotations(java.util.List<java.lang.annotation.Annotation> annotations) |
private ArquillianResource |
getResourceAnnotation(java.lang.annotation.Annotation[] annotations) |
private java.lang.Object |
lookup(java.lang.Class<?> type,
ArquillianResource resource,
java.util.List<java.lang.annotation.Annotation> qualifiers) |
java.lang.Object[] |
resolve(java.lang.reflect.Method method)
Extension point to add features to the test method arguments.
IE. |
@Inject private Instance<ServiceLoader> loader
public void enrich(java.lang.Object testCase)
TestEnricher
enrich
in interface TestEnricher
testCase
- The test case instancepublic java.lang.Object[] resolve(java.lang.reflect.Method method)
TestEnricher
TestEnricher
.resolve
in interface TestEnricher
private java.lang.Object lookup(java.lang.Class<?> type, ArquillianResource resource, java.util.List<java.lang.annotation.Annotation> qualifiers)
type
- resource
- java.lang.IllegalArgumentException
- If no ResourceProvider found for Typejava.lang.RuntimeException
- If ResourceProvider return nullprivate ArquillianResource getResourceAnnotation(java.lang.annotation.Annotation[] annotations)
private java.util.List<java.lang.annotation.Annotation> filterAnnotations(java.util.List<java.lang.annotation.Annotation> annotations)
annotations
- private void checkPresentScopeInjection(java.util.List<java.lang.annotation.Annotation> qualifiers, java.lang.Class<? extends java.lang.annotation.Annotation> scope)