org.apache.turbine.test
Class EnhancedMockHttpSession

java.lang.Object
  extended by com.mockobjects.MockObject
      extended by com.mockobjects.servlet.MockHttpSession
          extended by org.apache.turbine.test.EnhancedMockHttpSession
All Implemented Interfaces:
com.mockobjects.Verifiable, javax.servlet.http.HttpSession

public class EnhancedMockHttpSession
extends com.mockobjects.servlet.MockHttpSession

Extension to the basic MockHttpSession to provide some extra parameters required by Turbine.

Version:
$Id: EnhancedMockHttpSession.java 615328 2008-01-25 20:25:05Z tv $
Author:
Eric Pugh

Constructor Summary
EnhancedMockHttpSession()
           
 
Method Summary
 Object getAttribute(String attributeName)
          The underlying mock objects throws an Assert failure if we don't have an attribute.
 int getMaxInactiveInterval()
           
 boolean isNew()
          The default MockHttpSession doesn't implement this method.
 void setMaxInactiveInterval(int maxInactiveInterval)
           
 
Methods inherited from class com.mockobjects.servlet.MockHttpSession
getAttributeNames, getCreationTime, getId, getLastAccessedTime, getServletContext, getSessionContext, getValue, getValueNames, invalidate, putValue, removeAttribute, removeValue, setAttribute, setExpectedAttribute, setExpectedRemoveAttribute, setupGetAttribute, setupGetAttributeNames, setupServletContext
 
Methods inherited from class com.mockobjects.MockObject
assertEquals, assertEquals, assertTrue, fail, notImplemented, notYetImplemented, notYetImplemented, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.mockobjects.Verifiable
verify
 

Constructor Detail

EnhancedMockHttpSession

public EnhancedMockHttpSession()
Method Detail

isNew

public boolean isNew()
The default MockHttpSession doesn't implement this method. It always returns true.

Specified by:
isNew in interface javax.servlet.http.HttpSession
Overrides:
isNew in class com.mockobjects.servlet.MockHttpSession

setMaxInactiveInterval

public void setMaxInactiveInterval(int maxInactiveInterval)
Specified by:
setMaxInactiveInterval in interface javax.servlet.http.HttpSession
Overrides:
setMaxInactiveInterval in class com.mockobjects.servlet.MockHttpSession

getMaxInactiveInterval

public int getMaxInactiveInterval()
Specified by:
getMaxInactiveInterval in interface javax.servlet.http.HttpSession
Overrides:
getMaxInactiveInterval in class com.mockobjects.servlet.MockHttpSession

getAttribute

public Object getAttribute(String attributeName)
The underlying mock objects throws an Assert failure if we don't have an attribute. However, in Turbine, getting a null is okay, it just means we haven't put the object in yet!

Specified by:
getAttribute in interface javax.servlet.http.HttpSession
Overrides:
getAttribute in class com.mockobjects.servlet.MockHttpSession


Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.