From: Jeff M. <cus...@us...> - 2002-08-27 14:13:27
|
Update of /cvsroot/mockobjects/mockobjects-java/src/j2ee/1.3/com/mockobjects/servlet In directory usw-pr-cvs1:/tmp/cvs-serv27299/src/j2ee/1.3/com/mockobjects/servlet Modified Files: MockHttpSession.java Log Message: Added setupGetAttributeNames and added notYetImplemented Index: MockHttpSession.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/j2ee/1.3/com/mockobjects/servlet/MockHttpSession.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MockHttpSession.java 23 Feb 2002 18:50:35 -0000 1.1 +++ MockHttpSession.java 27 Aug 2002 14:13:22 -0000 1.2 @@ -1,26 +1,36 @@ package com.mockobjects.servlet; -import javax.servlet.*; -import javax.servlet.http.*; -import java.util.*; -import com.mockobjects.*; +import java.util.Enumeration; +import java.util.HashMap; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionContext; + +import org.omg.CORBA.PUBLIC_MEMBER; + +import com.mockobjects.ExpectationSet; +import com.mockobjects.MapEntry; +import com.mockobjects.MockObject; +import com.mockobjects.Verifiable; public class MockHttpSession extends MockObject implements HttpSession, Verifiable { - public ExpectationSet myAttributes = new ExpectationSet("session attributes"); - public HashMap attributes = new HashMap(); + private ExpectationSet myAttributes = new ExpectationSet("session attributes"); + private HashMap attributes = new HashMap(); + private Enumeration attributeNames; private ServletContext servletContext; - public MockHttpSession() { - super(); - } - public Object getAttribute(String arg1) { return attributes.get(arg1); } + public void setupGetAttributeNames(Enumeration attributeNames) { + this.attributeNames = attributeNames; + } + public Enumeration getAttributeNames() { - return null; + return attributeNames; } public long getCreationTime() { @@ -39,10 +49,12 @@ } public int getMaxInactiveInterval() { + notImplemented(); return 0; } public HttpSessionContext getSessionContext() { + notImplemented(); return null; } @@ -59,25 +71,30 @@ return null; } - public java.lang.String[] getValueNames() { + public String[] getValueNames() { notImplemented(); return null; } public void invalidate() { + notImplemented(); } public boolean isNew() { + notImplemented(); return false; } public void putValue(String arg1, Object arg2) { + notImplemented(); } public void removeAttribute(String arg1) { + notImplemented(); } public void removeValue(String arg1) { + notImplemented(); } public void setAttribute(String aKey, Object aValue) { @@ -90,9 +107,6 @@ } public void setMaxInactiveInterval(int arg1) { - } - - public void verify() { - myAttributes.verify(); + notImplemented(); } } |