Search in sources :

Example 6 with ScopeData

use of jodd.madvoc.config.ScopeData in project jodd by oblac.

the class ScopeDataInspectorTest method testInAnnotations.

@Test
void testInAnnotations() {
    ScopeDataInspector scopeDataInspector = new ScopeDataInspector();
    PetiteContainer madpc = new PetiteContainer();
    scopeDataInspector.scopeResolver = new ScopeResolver();
    scopeDataInspector.scopeResolver.madpc = madpc;
    madpc.addBean("madvocEncoding", new MadvocEncoding());
    ScopeData scopeData = scopeDataInspector.inspectClassScopes(Action.class);
    InjectionPoint[] in1 = scopeData.in();
    InjectionPoint in = in1[0];
    assertEquals("input", in.name());
    assertEquals(String.class, in.type());
}
Also used : InjectionPoint(jodd.madvoc.config.InjectionPoint) ScopeData(jodd.madvoc.config.ScopeData) PetiteContainer(jodd.petite.PetiteContainer) Test(org.junit.jupiter.api.Test)

Aggregations

ScopeData (jodd.madvoc.config.ScopeData)6 InjectionPoint (jodd.madvoc.config.InjectionPoint)4 Annotation (java.lang.annotation.Annotation)2 In (jodd.madvoc.meta.In)2 Out (jodd.madvoc.meta.Out)2 PetiteContainer (jodd.petite.PetiteContainer)2 Test (org.junit.jupiter.api.Test)2 Field (java.lang.reflect.Field)1 Method (java.lang.reflect.Method)1 ArrayList (java.util.ArrayList)1 ServletContext (javax.servlet.ServletContext)1 ClassDescriptor (jodd.introspector.ClassDescriptor)1 Mapper (jodd.introspector.Mapper)1 MapperFunction (jodd.introspector.MapperFunction)1 PropertyDescriptor (jodd.introspector.PropertyDescriptor)1 ActionRuntime (jodd.madvoc.config.ActionRuntime)1 MethodParam (jodd.madvoc.config.MethodParam)1 Targets (jodd.madvoc.config.Targets)1