package org.musetest.builtins.tests;

import org.junit.*;
import org.musetest.builtins.value.property.*;
import org.musetest.core.*;

/**
 * @author Christopher L Merrill (see LICENSE.txt for license details)
 */
public class PropertyResolverTests
    {
    @Test
    public void reflectionResolver() throws MuseExecutionError
        {
        // calls the "length" method on String
        final Object target = "1234567";
        final String name = "length";
        final Object result = 7;

        PropertyResolver resolver = new ReflectionPropertyResolver();
        Assert.assertTrue(resolver.canResolve(target, name));
        Assert.assertEquals(result, resolver.resolve(target, name));
        }
    }



@@ -291,16 +291,28 @@
 Resolver
+ByMethodName
 () throw
@@ -332,16 +332,16 @@
 onError%0A
-
         
@@ -498,17 +498,525 @@
 esult = 
-7
+((String)target).length();%0A%0A        PropertyResolver resolver = new ReflectionPropertyResolver();%0A        Assert.assertTrue(resolver.canResolve(target, name));%0A        Assert.assertEquals(result, resolver.resolve(target, name));%0A        %7D%0A%0A    @Test%0A    public void reflectionResolverByBeanGetter() throws MuseExecutionError%0A        %7B%0A        // calls the %22getClass%22 method on an object%0A        final Object target = %22blah%22;%0A        final String name = %22class%22;%0A        final Object result = target.getClass()
 ;%0A%0A     

add test for accessing bean properties (getters)