Example usage for org.springframework.expression.spel.support StandardEvaluationContext getRootObject

List of usage examples for org.springframework.expression.spel.support StandardEvaluationContext getRootObject

Introduction

In this page you can find the example usage for org.springframework.expression.spel.support StandardEvaluationContext getRootObject.

Prototype

@Override
    public TypedValue getRootObject() 

Source Link

Usage

From source file:org.echocat.redprecursor.annotations.ParametersPassesExpressionUnitTest.java

@Test
public void testToContext() throws Exception {
    final MethodCall<ParametersPassesExpressionUnitTest> methodCall = toMethodCall(
            ParametersPassesExpressionUnitTest.class, this, "test", "a", 1, "b", 2);
    final StandardEvaluationContext context = new Evaluator().toContext(methodCall);
    assertThat(context.getRootObject().getValue(), is((Object) methodCall));
    assertThat(context.lookupVariable("methodName"), is((Object) "test"));
    assertThat(context.lookupVariable("parameters"), is((Object) methodCall.getParameters()));
    assertThat(context.getPropertyAccessors(), is(Evaluator.DEFAULT_PROPERTY_ACCESSORS));
}