@Test public void testEqualsHelper() { MustacheEngine engine = MustacheEngineBuilder.newBuilder() .addGlobalData("archiveType", ArchiveType.class) .registerHelpers(HelpersBuilder.empty().addIsEqual() .addIsNotEqual().build()) .build(); assertEquals("EQUALS", engine.compileMustache("equals_helper1", "{{#isEq this.age this.age}}EQUALS{{/isEq}}") .render(new Hammer())); assertEquals( "EQUALS", engine .compileMustache("equals_helper2", "{{#isEq this}}EQUALS{{/isEq}}") .render(new Hammer())); assertEquals("NOT_EQUALS", engine.compileMustache("equals_helper3", "{{#isNotEq this.age}}NOT_EQUALS{{/isNotEq}}") .render(new Hammer())); assertEquals("NOT_EQUALS", engine.compileMustache("equals_helper4", "{{#isNotEq this.age this.toString}}NOT_EQUALS{{/isNotEq}}") .render(new Hammer())); assertEquals("It's a WAR!", engine .compileMustache("equals_helper5", "{{#with this.archiveType}}" + "{{#isEq archiveType.WAR}}" + "It's a WAR!" + "{{/isEq}}" + "{{#isEq archiveType.EAR}}" + "It's an EAR!" + "{{/isEq}}" + "{{/with}}") .render(new Hammer())); }
public EqualsHelper() { this(false); }
EqualsHelper extends BasicSectionHelper { public EqualsHelper() { this(false); } }
EqualsHelper extends BasicSectionHelper { public EqualsHelper() { this(false); } EqualsHelper();  EqualsHelper(boolean testInequality); }
EqualsHelper extends BasicSectionHelper { public EqualsHelper() { this(false); } EqualsHelper();  EqualsHelper(boolean testInequality); @Override void execute(Options options); }
EqualsHelper extends BasicSectionHelper { public EqualsHelper() { this(false); } EqualsHelper();  EqualsHelper(boolean testInequality); @Override void execute(Options options);  }