Package org.springframework.expression.spel.testdata

Examples of org.springframework.expression.spel.testdata.PersonInOtherPackage


    context = new StandardEvaluationContext(new Object[] { person.getAge() });
    context.setVariable("it", person);
    assertTrue(ex.getValue(context, Boolean.class));
    assertTrue(ex.getValue(context, Boolean.class));
   
    PersonInOtherPackage person2 = new PersonInOtherPackage(1);
    ex = parser.parseRaw("#it?.age.equals([0])");
    context =
        new StandardEvaluationContext(new Object[] { person2.getAge() });
    context.setVariable("it", person2);
    assertTrue(ex.getValue(context, Boolean.class));
    assertTrue(ex.getValue(context, Boolean.class));
   
    ex = parser.parseRaw("#it?.age.equals([0])");
    context =
        new StandardEvaluationContext(new Object[] { person2.getAge() });
    context.setVariable("it", person2);
    assertTrue((Boolean)ex.getValue(context));
    assertTrue((Boolean)ex.getValue(context));
  }
View Full Code Here

TOP

Related Classes of org.springframework.expression.spel.testdata.PersonInOtherPackage

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.