/*
 * Created on Aug 2, 2005
 * 
 * $Log$
 * Revision 1.1  2005/08/03 00:35:29  dsowen
 * Initial commit.
 *
 */
package ws.fugue88.jpath;

import junit.framework.TestCase;

/**
 * @author dsowen
 */
public class FieldPropertyTest extends TestCase {

	public void testGet() throws Exception
	{
		class A {

			String b = "test";
		}
		A a = new A();

		FieldProperty property = new FieldProperty("b", A.class, "b");
		assertSame(a.b, property.getValue(a));
	}

	public void testSet() throws Exception
	{
		class A {

			String b = "test";
		}
		A a = new A();

		FieldProperty property = new FieldProperty("b", A.class, "b");
		property.setValue(a, "done");
		assertEquals("done", a.b);
	}
}