1. opensymphony
  2. xwork

Commits

tmjee  committed 4e2adcd

added a simple testcase for ActionContext's ThreadLocal

Issue number:
Obtained from:
Submitted by:
Reviewed by:

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

  • Participants
  • Parent commits b8a9f3b
  • Branches master

Comments (0)

Files changed (1)

File src/test/com/opensymphony/xwork/ActionContextThreadLocalTest.java

View file
+/*
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.xwork;
+
+import java.util.HashMap;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Simple Test ActionContext's ThreadLocal
+ * 
+ * @author tm_jee
+ * @version $Date$ $Id$
+ */
+public class ActionContextThreadLocalTest extends TestCase {
+
+	
+	public void testGetContext() throws Exception {
+		assertNotNull(ActionContext.getContext());
+	}
+	
+	public void testSetContext() throws Exception {
+		ActionContext context = new ActionContext(new HashMap());
+		ActionContext.setContext(context);
+		assertEquals(context, ActionContext.getContext());
+	}
+}