Search in sources :

Example 1 with ScopeDataResolver

use of jodd.madvoc.component.ScopeDataResolver in project jodd by oblac.

the class ScopeDataResolverTest method testGenericAction.

@Test
public void testGenericAction() {
    ScopeDataResolver scopeDataResolver = new ScopeDataResolver();
    ScopeData[] scopeData = scopeDataResolver.resolveScopeData(GenAction.class);
    ScopeData.In[] in1 = scopeData[ScopeType.REQUEST.value()].in;
    ScopeData.Out[] out1 = scopeData[ScopeType.REQUEST.value()].out;
    ScopeData.In in = in1[0];
    ScopeData.Out out = out1[0];
    assertEquals("input", in.name);
    assertEquals(String.class, in.type);
    assertEquals("output", out.name);
    assertEquals(Integer.class, out.type);
}
Also used : ScopeDataResolver(jodd.madvoc.component.ScopeDataResolver) In(jodd.madvoc.meta.In) ScopeData(jodd.madvoc.ScopeData) Out(jodd.madvoc.meta.Out) Test(org.junit.Test)

Example 2 with ScopeDataResolver

use of jodd.madvoc.component.ScopeDataResolver in project jodd by oblac.

the class ScopeDataResolverTest method testInAnnotations.

@Test
public void testInAnnotations() {
    ScopeDataResolver scopeDataResolver = new ScopeDataResolver();
    ScopeData[] scopeData = scopeDataResolver.resolveScopeData(Action.class);
    ScopeData.In[] in1 = scopeData[ScopeType.REQUEST.value()].in;
    ScopeData.In in = in1[0];
    assertEquals("input", in.name);
    assertEquals(String.class, in.type);
}
Also used : ScopeDataResolver(jodd.madvoc.component.ScopeDataResolver) In(jodd.madvoc.meta.In) ScopeData(jodd.madvoc.ScopeData) Test(org.junit.Test)

Aggregations

ScopeData (jodd.madvoc.ScopeData)2 ScopeDataResolver (jodd.madvoc.component.ScopeDataResolver)2 In (jodd.madvoc.meta.In)2 Test (org.junit.Test)2 Out (jodd.madvoc.meta.Out)1