added MustacheCustomContext

This commit is contained in:
Devin Smith
2018-08-21 17:20:00 -05:00
parent 4533567303
commit 433e9677d4
4 changed files with 30 additions and 0 deletions
@@ -45,6 +45,15 @@ public class MustacheTest extends SharedTests
});
}
@Test public void testMustacheCustomContext() {
test("bar", "{{foo}}", new MustacheCustomContext() {
@Override
public Object get(String name) {
return "foo".equals(name) ? "bar" : null;
}
});
}
public interface HasDefault {
default String getFoo () { return "bar"; }
}