Examples of useBooleans()


Examples of org.openntf.formula.FormulaContext.useBooleans()

  }

  /*----------------------------------------------------------------------------*/
  private String solve(final LSFocStringMap docMap, final LSFocStringMap contextMap) {
    FormulaContext ctx = Formulas.createContext(docMap, iParser);
    ctx.useBooleans(false);
    ctx.setParameterProvider(new FormulaProvider<Object>() {
      public Object get(final String what) {
        return contextMap.get(what);
      }
    });
View Full Code Here

Examples of org.openntf.formula.FormulaContext.useBooleans()

  }

  @Test
  public final void testIsTrue() {
    FormulaContext ctx = Formulas.createContext(null, null);
    ctx.useBooleans(false);
    assertTrue(!vhi.isTrue(ctx));
    vhi.add(0);
    assertTrue(!vhi.isTrue(ctx));
    vhi.add(1);
    assertTrue(vhi.isTrue(ctx));
View Full Code Here

Examples of org.openntf.formula.FormulaContext.useBooleans()

  }

  @Test(expected = ClassCastException.class)
  public final void testIsTrue2() {
    FormulaContext ctx = Formulas.createContext(null, null);
    ctx.useBooleans(true);
    vhi.add(0);
    assertTrue(!vhi.isTrue(ctx));
  }

  @Test(expected = IllegalArgumentException.class)
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.