4647484950515253
assertEquals("Hi there 10,joe",result); } @Test public void testVarsPOJO(){ String result = engine.parse("Hi there ${var},${var2}", new POJOValuesProvider(new Model())).trim(); assertEquals("Hi there 10,yyy",result); }
5253545556575859
assertEquals("Hi there 10,yyy",result); } @Test public void testVarsPOJOGetters(){ String result = engine.parse("Hi there ${var},${var2}", new POJOValuesProvider(new ModelGetters())).trim(); assertEquals("Hi there 10,yyy",result); }
217218219220221222223224
@Test public void testNestedProperty(){ TreeMap<String, Object> model = new TreeMap<String, Object>(); model.put("a", new Model()); String result = engine.parse("${a.var}\n", new POJOValuesProvider(model)).trim(); assertEquals("10",result); }