source: trunk/testsrc/ws/fugue88/jpath/PropertyAccessorTest.java

Last change on this file was 2, checked in by dsowen, 21 years ago

Initial commit.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 564 bytes
Line 
1/*
2 * Created on Aug 2, 2005
3 *
4 * $Log$
5 * Revision 1.1  2005/08/03 00:35:29  dsowen
6 * Initial commit.
7 *
8 */
9package ws.fugue88.jpath;
10
11import junit.framework.TestCase;
12
13/**
14 * @author dsowen
15 */
16public class PropertyAccessorTest extends TestCase {
17
18        public void testFieldAccessor() throws Exception
19        {
20                class A {
21
22                        String b = "test";
23                }
24                A a = new A();
25
26                PropertyAccessor accessor = new PropertyAccessor(a, new FieldProperty(
27                                "b", A.class, "b"));
28                assertSame(a.b, accessor.getValue());
29                accessor.setValue("done");
30                assertEquals("done", a.b);
31        }
32}
Note: See TracBrowser for help on using the repository browser.