Coverage Report - org.seasar.teeda.core.mock.MockServletRequestParameterValuesMap
 
Classes in this File Line Coverage Branch Coverage Complexity
MockServletRequestParameterValuesMap
67%
6/9
N/A
1
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package org.seasar.teeda.core.mock;
 17  
 
 18  
 import java.util.Enumeration;
 19  
 
 20  
 import org.seasar.framework.mock.servlet.MockHttpServletRequest;
 21  
 import org.seasar.teeda.core.context.AbstractExternalContextMap;
 22  
 
 23  
 /**
 24  
  * @author manhole
 25  
  */
 26  
 public class MockServletRequestParameterValuesMap extends
 27  
         AbstractExternalContextMap {
 28  
 
 29  
     private final MockHttpServletRequest request_;
 30  
 
 31  
     public MockServletRequestParameterValuesMap(
 32  6
             final MockHttpServletRequest request) {
 33  6
         request_ = request;
 34  6
     }
 35  
 
 36  
     protected Object getAttribute(String key) {
 37  12
         return request_.getParameterValues(key);
 38  
     }
 39  
 
 40  
     protected Enumeration getAttributeNames() {
 41  0
         return request_.getParameterNames();
 42  
     }
 43  
 
 44  
     protected void setAttribute(String key, Object value) {
 45  3
         request_.setParameter(key, (String[]) value);
 46  3
     }
 47  
 
 48  
     protected void removeAttribute(String key) {
 49  0
         request_.setParameter(key, (String[]) null);
 50  0
     }
 51  
 
 52  
 }