@ -262,12 +262,12 @@ public class PropertyAccessTests extends AbstractExpressionTests {
@@ -262,12 +262,12 @@ public class PropertyAccessTests extends AbstractExpressionTests {
@Test
public void propertyAccessWithInstanceMethodResolverAndTypedRootObject ( ) {
Person targe t = new Person ( "p1" ) ;
Person rootObjec t = new Person ( "p1" ) ;
EvaluationContext context = SimpleEvaluationContext . forReadOnlyDataBinding ( ) .
withInstanceMethods ( ) . withTypedRootObject ( targe t, TypeDescriptor . valueOf ( Object . class ) ) . build ( ) ;
withInstanceMethods ( ) . withTypedRootObject ( rootObjec t, TypeDescriptor . valueOf ( Object . class ) ) . build ( ) ;
assertThat ( parser . parseExpression ( "name.substring(1)" ) . getValue ( context , target ) ) . isEqualTo ( "1" ) ;
assertThat ( context . getRootObject ( ) . getValue ( ) ) . isSameAs ( targe t) ;
assertThat ( parser . parseExpression ( "name.substring(1)" ) . getValue ( context ) ) . isEqualTo ( "1" ) ;
assertThat ( context . getRootObject ( ) . getValue ( ) ) . isSameAs ( rootObjec t) ;
assertThat ( context . getRootObject ( ) . getTypeDescriptor ( ) . getType ( ) ) . isSameAs ( Object . class ) ;
}