Package org.springframework.expression

Examples of org.springframework.expression.ExpressionParser


  }

  @Test
  public void SPR9486_floatEqDoubleUnaryMinus() {
    Boolean expectedResult = -10.21f == -10.2;
    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();
    Expression expression = parser.parseExpression("-10.21f == -10.2");
    Boolean result = expression.getValue(context, null, Boolean.class);
    assertEquals(expectedResult, result);
  }
View Full Code Here


  }

  @Test
  public void SPR9486_floatEqFloat() {
    Boolean expectedResult = 10.215f == 10.2109f;
    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();
    Expression expression = parser.parseExpression("10.215f == 10.2109f");
    Boolean result = expression.getValue(context, null, Boolean.class);
    assertEquals(expectedResult, result);
  }
View Full Code Here

  }

  @Test
  public void SPR9486_floatEqDouble() {
    Boolean expectedResult = 10.215f == 10.2109;
    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();
    Expression expression = parser.parseExpression("10.215f == 10.2109");
    Boolean result = expression.getValue(context, null, Boolean.class);
    assertEquals(expectedResult, result);
  }
View Full Code Here

  }

  @Test
  public void SPR9486_floatNotEqFloat() {
    Boolean expectedResult = 10.215f != 10.2109f;
    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();
    Expression expression = parser.parseExpression("10.215f != 10.2109f");
    Boolean result = expression.getValue(context, null, Boolean.class);
    assertEquals(expectedResult, result);
  }
View Full Code Here

  }

  @Test
  public void SPR9486_floatNotEqDouble() {
    Boolean expectedResult = 10.215f != 10.2109;
    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();
    Expression expression = parser.parseExpression("10.215f != 10.2109");
    Boolean result = expression.getValue(context, null, Boolean.class);
    assertEquals(expectedResult, result);
  }
View Full Code Here

  }

  @Test
  public void SPR9486_floatLessThanFloat() {
    Boolean expectedNumber = -10.21f < -10.2f;
    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();
    Expression expression = parser.parseExpression("-10.21f < -10.2f");
    Boolean result = expression.getValue(context, null, Boolean.class);
    assertEquals(expectedNumber, result);
  }
View Full Code Here

  }

  @Test
  public void SPR9486_floatLessThanDouble() {
    Boolean expectedNumber = -10.21f < -10.2;
    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();
    Expression expression = parser.parseExpression("-10.21f < -10.2");
    Boolean result = expression.getValue(context, null, Boolean.class);
    assertEquals(expectedNumber, result);
  }
View Full Code Here

  }

  @Test
  public void SPR9486_floatLessThanOrEqualFloat() {
    Boolean expectedNumber = -10.21f <= -10.22f;
    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();
    Expression expression = parser.parseExpression("-10.21f <= -10.22f");
    Boolean result = expression.getValue(context, null, Boolean.class);
    assertEquals(expectedNumber, result);
  }
View Full Code Here

  }

  @Test
  public void SPR9486_floatLessThanOrEqualDouble() {
    Boolean expectedNumber = -10.21f <= -10.2;
    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();
    Expression expression = parser.parseExpression("-10.21f <= -10.2");
    Boolean result = expression.getValue(context, null, Boolean.class);
    assertEquals(expectedNumber, result);
  }
View Full Code Here

  }

  @Test
  public void SPR9486_floatGreaterThanFloat() {
    Boolean expectedNumber = -10.21f > -10.2f;
    ExpressionParser parser = new SpelExpressionParser();
    StandardEvaluationContext context = new StandardEvaluationContext();
    Expression expression = parser.parseExpression("-10.21f > -10.2f");
    Boolean result = expression.getValue(context, null, Boolean.class);
    assertEquals(expectedNumber, result);
  }
View Full Code Here

TOP

Related Classes of org.springframework.expression.ExpressionParser

Copyright © 2018 www.massapicom. 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.