Support isFoo for boolean properties.

This is addition to the existing getFoo support.
This commit is contained in:
Waldinar Oliveira Neto
2015-06-20 18:21:47 -07:00
committed by Michael Bayne
parent 2aa93d4240
commit ee4178f549
2 changed files with 28 additions and 2 deletions
@@ -47,6 +47,18 @@ public class MustacheTest
});
}
@Test public void testBooleanPropertyVariable () {
test("true", "{{foo}}", new Object() {
Boolean isFoo () { return true; }
});
}
@Test public void testPrimitiveBooleanPropertyVariable () {
test("false", "{{foo}}", new Object() {
boolean isFoo () { return false; }
});
}
@Test public void testSkipVoidReturn () {
test("bar", "{{foo}}", new Object() {
void foo () {}