Support isFoo for boolean properties.
This is addition to the existing getFoo support.
This commit is contained in:
committed by
Michael Bayne
parent
2aa93d4240
commit
ee4178f549
@@ -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 () {}
|
||||
|
||||
Reference in New Issue
Block a user