Search in sources :

Example 1 with Issue303

use of org.nutz.el.issue.Issue303 in project nutz by nutzam.

the class El2Test method testIssue303.

@Test
public void testIssue303() {
    Context context = Lang.context();
    Issue303 item = new Issue303("item");
    item.child = new Issue303("child");
    context.set("item", item);
    assertEquals("child", El.eval(context, "item.child.getName()"));
    assertEquals(0, El.eval(context, "item.list.size()"));
}
Also used : Context(org.nutz.lang.util.Context) Issue303(org.nutz.el.issue.Issue303) SimpleSpeedTest(org.nutz.el.speed.SimpleSpeedTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Issue303 (org.nutz.el.issue.Issue303)1 SimpleSpeedTest (org.nutz.el.speed.SimpleSpeedTest)1 Context (org.nutz.lang.util.Context)1