Commits

Anonymous committed 1c33781

test for setting name in action context

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@11e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/test/com/opensymphony/xwork/DefaultActionProxyTest.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.xwork;
+
+import com.opensymphony.xwork.config.ConfigurationManager;
+import com.opensymphony.xwork.config.providers.MockConfigurationProvider;
+
+import junit.framework.TestCase;
+
+
+/**
+ * DefaultActionProxyTest
+ * @author Jason Carreira
+ * Created Aug 8, 2003 1:41:45 AM
+ */
+public class DefaultActionProxyTest extends TestCase {
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void setUp() {
+        ConfigurationManager.clearConfigurationProviders();
+        ConfigurationManager.addConfigurationProvider(new MockConfigurationProvider());
+    }
+
+    public void testActionNameIsSet() throws Exception {
+        ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy("", MockConfigurationProvider.FOO_ACTION_NAME, null);
+        assertEquals(MockConfigurationProvider.FOO_ACTION_NAME, ActionContext.getContext().getName());
+    }
+}