Search in sources :

Example 1 with Issue314

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

the class El2Test method test_issue314.

@Test
public void test_issue314() {
    Context context = Lang.context();
    context.set("String", String.class);
    Issue314 i314 = new Issue314();
    List<String> list = new ArrayList<String>();
    list.add("123");
    i314.setList(list);
    context.set("map", i314);
    assertEquals("123", El.eval(context, "String.valueOf(123)"));
    assertEquals("123", El.eval(context, "map.list.get(0)"));
}
Also used : Context(org.nutz.lang.util.Context) Issue314(org.nutz.el.issue.Issue314) ArrayList(java.util.ArrayList) SimpleSpeedTest(org.nutz.el.speed.SimpleSpeedTest) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1 Issue314 (org.nutz.el.issue.Issue314)1 SimpleSpeedTest (org.nutz.el.speed.SimpleSpeedTest)1 Context (org.nutz.lang.util.Context)1