Commits

Anonymous committed c4f4bf2

added a testcase for testing the accessing CompoundRoot using OGNL enchanced feature (ognl 2.7.+)

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/xwork_1-2@1673e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/test/com/opensymphony/xwork/util/CompoundRootAccessorTest.java

+package com.opensymphony.xwork.util;
+
+import com.opensymphony.xwork.XWorkTestCase;
+import ognl.OgnlRuntime;
+import ognl.PropertyAccessor;
+
+/**
+ * Test accessing {@link com.opensymphony.xwork.util.CompoundRootAccessor} through
+ * the new enchance feature of OGNL (2.7+)
+ *
+ * @author tmjee
+ * @version $Date$ $Id$
+ */
+public class CompoundRootAccessorTest extends XWorkTestCase {
+
+    private PropertyAccessor oldCompoundRootAccessor;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        oldCompoundRootAccessor = OgnlRuntime.getPropertyAccessor(CompoundRoot.class);
+    }
+
+    protected void tearDown() throws Exception {
+        OgnlRuntime.setPropertyAccessor(CompoundRoot.class, oldCompoundRootAccessor);
+        super.tearDown();
+    }
+
+    public void test() throws Exception {
+        CompoundRoot root = new CompoundRoot();
+        OgnlRuntime.getPropertyAccessor(CompoundRoot.class);
+
+        // TODO: finish me
+
+    }
+
+}