Package cambridge.model

Examples of cambridge.model.Expression.asBoolean()


   public void testBoolean() {
      String expression = "true || false";
      try {
         Expression e = Expressions.parse(expression, 0, 0);
         //assertEquals("Testing type", CambridgeExpression.Type.Boolean, e.getType(bindings));
         assertTrue(e.asBoolean(bindings));
      } catch (ExpressionParsingException e) {
         e.printStackTrace();
      } catch (ExpressionEvaluationException e) {
         e.printStackTrace();
      }
View Full Code Here


    {
        String expression = "true || false";
        ExpressionContext context = expressionLanguage.createNewContext();
        Expression e = expressionLanguage.parse(expression, 0, 0);
        //assertEquals("Testing type", CambridgeExpression.Type.Boolean, e.getType(bindings));
        assertTrue(e.asBoolean(context));
    }

    @Test
    public void testList() throws Exception
    {
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.