Package com.github.mustachejava.reflect

Examples of com.github.mustachejava.reflect.Guard.apply()


    CompilableClassGuard stringClassGuard = new CompilableClassGuard(0, "");
    List<CompilableGuard> guards = new ArrayList<CompilableGuard>();
    guards.add(stringClassGuard);

    Guard testGuard = compile(guards);
    assertTrue("string is ok", testGuard.apply(new Object[]{"test", 1}));
    assertFalse("integer is not ok", testGuard.apply(new Object[]{1, "test"}));
  }

}
View Full Code Here


    List<CompilableGuard> guards = new ArrayList<CompilableGuard>();
    guards.add(stringClassGuard);

    Guard testGuard = compile(guards);
    assertTrue("string is ok", testGuard.apply(new Object[]{"test", 1}));
    assertFalse("integer is not ok", testGuard.apply(new Object[]{1, "test"}));
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.