1 20 package org.apache.cactus.sample.servlet.unit; 21 22 import java.io.IOException ; 23 24 import org.apache.cactus.JspTestCase; 25 import org.apache.cactus.server.HttpServletRequestWrapper; 26 import org.apache.cactus.server.ServletConfigWrapper; 27 28 34 public class TestJspPageContext extends JspTestCase 35 { 36 41 public void testPageContext() throws IOException 42 { 43 assertNotNull("Page context should not be null", pageContext); 44 45 HttpServletRequestWrapper wrappedRequest = 46 (HttpServletRequestWrapper) pageContext.getRequest(); 47 assertSame(request.getOriginalRequest(), 48 wrappedRequest.getOriginalRequest()); 49 50 assertSame(response, pageContext.getResponse()); 51 52 ServletConfigWrapper wrappedConfig = 53 (ServletConfigWrapper) pageContext.getServletConfig(); 54 assertSame(config.getOriginalConfig(), 55 wrappedConfig.getOriginalConfig()); 56 } 57 } 58 | Popular Tags |