01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.webwork.views.jsp;
06:
07: import com.mockobjects.servlet.MockHttpSession;
08:
09: import java.util.Enumeration;
10: import java.util.Hashtable;
11:
12: /**
13: * WebWorkMockHttpSession
14: *
15: * @author Jason Carreira
16: * Created Jun 5, 2003 9:26:31 PM
17: */
18: public class WebWorkMockHttpSession extends MockHttpSession {
19:
20: Hashtable attributes = new Hashtable();
21:
22: public void setAttribute(String s, Object o) {
23: attributes.put(s, o);
24: }
25:
26: public Object getAttribute(String s) {
27: return attributes.get(s);
28: }
29:
30: public Enumeration getAttributeNames() {
31: return attributes.keys();
32: }
33:
34: public void setExpectedAttribute(String s, Object o) {
35: throw new UnsupportedOperationException();
36: }
37:
38: public void setExpectedRemoveAttribute(String s) {
39: throw new UnsupportedOperationException();
40: }
41:
42: public void removeAttribute(String s) {
43: attributes.remove(s);
44: }
45:
46: public void setupGetAttribute(String s, Object o) {
47: throw new UnsupportedOperationException();
48: }
49:
50: public void setupGetAttributeNames(Enumeration enumeration) {
51: throw new UnsupportedOperationException();
52: }
53: }
|