2011/08/05 - Jakarta Cactus has been retired.

For more information, please explore the Attic.

Clover coverage report - Cactus 1.8dev for J2EE API 1.3
Coverage timestamp: Sun Mar 26 2006 18:50:18 BRT
file stats: LOC: 112   Methods: 4
NCLOC: 34   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
ServletTestCase.java - 50% 50% 50%
coverage coverage
 1   
 /* 
 2   
  * ========================================================================
 3   
  * 
 4   
  * Copyright 2001-2004 The Apache Software Foundation.
 5   
  *
 6   
  * Licensed under the Apache License, Version 2.0 (the "License");
 7   
  * you may not use this file except in compliance with the License.
 8   
  * You may obtain a copy of the License at
 9   
  * 
 10   
  *   http://www.apache.org/licenses/LICENSE-2.0
 11   
  * 
 12   
  * Unless required by applicable law or agreed to in writing, software
 13   
  * distributed under the License is distributed on an "AS IS" BASIS,
 14   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 15   
  * See the License for the specific language governing permissions and
 16   
  * limitations under the License.
 17   
  * 
 18   
  * ========================================================================
 19   
  */
 20   
 package org.apache.cactus;
 21   
 
 22   
 import javax.servlet.http.HttpServletResponse;
 23   
 import javax.servlet.http.HttpSession;
 24   
 
 25   
 import junit.framework.Test;
 26   
 
 27   
 import org.apache.cactus.internal.AbstractCactusTestCase;
 28   
 import org.apache.cactus.internal.CactusTestCase;
 29   
 import org.apache.cactus.internal.client.connector.http.HttpProtocolHandler;
 30   
 import org.apache.cactus.internal.configuration.DefaultServletConfiguration;
 31   
 import org.apache.cactus.server.ServletConfigWrapper;
 32   
 import org.apache.cactus.spi.client.connector.ProtocolHandler;
 33   
 
 34   
 /**
 35   
  * Cactus test case to unit test Servlets. Test classes that need access to 
 36   
  * valid Servlet implicit objects (such as the HTTP request, the HTTP response,
 37   
  * the servlet config, ...) must subclass this class.
 38   
  *
 39   
  * @version $Id: ServletTestCase.java 238991 2004-05-22 11:34:50Z vmassol $
 40   
  */
 41   
 public class ServletTestCase 
 42   
     extends AbstractCactusTestCase implements CactusTestCase
 43   
 {
 44   
     /**
 45   
      * Valid <code>HttpServletRequest</code> object that you can access from
 46   
      * the <code>testXXX()</code>, <code>setUp</code> and
 47   
      * <code>tearDown()</code> methods. If you try to access it from either the
 48   
      * <code>beginXXX()</code> or <code>endXXX()</code> methods it will
 49   
      * have the <code>null</code> value.
 50   
      */
 51   
     public org.apache.cactus.server.HttpServletRequestWrapper request;
 52   
 
 53   
     /**
 54   
      * Valid <code>HttpServletResponse</code> object that you can access from
 55   
      * the <code>testXXX()</code>, <code>setUp</code> and
 56   
      * <code>tearDown()</code> methods. If you try to access it from either the
 57   
      * <code>beginXXX()</code> or <code>endXXX()</code> methods it will
 58   
      * have the <code>null</code> value.
 59   
      */
 60   
     public HttpServletResponse response;
 61   
 
 62   
     /**
 63   
      * Valid <code>HttpSession</code> object that you can access from
 64   
      * the <code>testXXX()</code>, <code>setUp</code> and
 65   
      * <code>tearDown()</code> methods. If you try to access it from either the
 66   
      * <code>beginXXX()</code> or <code>endXXX()</code> methods it will
 67   
      * have the <code>null</code> value.
 68   
      */
 69   
     public HttpSession session;
 70   
 
 71   
     /**
 72   
      * Valid <code>ServletConfig</code> object that you can access from
 73   
      * the <code>testXXX()</code>, <code>setUp</code> and
 74   
      * <code>tearDown()</code> methods. If you try to access it from either the
 75   
      * <code>beginXXX()</code> or <code>endXXX()</code> methods it will
 76   
      * have the <code>null</code> value.
 77   
      */
 78   
     public ServletConfigWrapper config;
 79   
 
 80   
     /**
 81   
      * @see AbstractCactusTestCase#AbstractCactusTestCase()
 82   
      */
 83  38
     public ServletTestCase()
 84   
     {
 85  38
         super();
 86   
     }
 87   
 
 88   
     /**
 89   
      * @see AbstractCactusTestCase#AbstractCactusTestCase(String)
 90   
      */
 91  0
     public ServletTestCase(String theName)
 92   
     {
 93  0
         super(theName);
 94   
     }
 95   
 
 96   
     /**
 97   
      * @see AbstractCactusTestCase#AbstractCactusTestCase(String, Test)
 98   
      */
 99  0
     public ServletTestCase(String theName, Test theTest)
 100   
     {
 101  0
         super(theName, theTest);
 102   
     }
 103   
 
 104   
     /**
 105   
      * @see AbstractCactusTestCase#createProtocolHandler()
 106   
      */
 107  28
     protected ProtocolHandler createProtocolHandler()
 108   
     {
 109  28
         return new HttpProtocolHandler(new DefaultServletConfiguration());
 110   
     }
 111   
 }
 112