Coverage Report - org.seasar.teeda.core.mock.MockRenderKitFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
MockRenderKitFactory
86%
6/7
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.HashMap;
 19  
 import java.util.Iterator;
 20  
 import java.util.Map;
 21  
 
 22  
 import javax.faces.context.FacesContext;
 23  
 import javax.faces.render.RenderKit;
 24  
 import javax.faces.render.RenderKitFactory;
 25  
 
 26  
 public class MockRenderKitFactory extends RenderKitFactory {
 27  
 
 28  1339
     private Map renderKits_ = new HashMap();
 29  
 
 30  1339
     public MockRenderKitFactory() {
 31  1339
     }
 32  
 
 33  
     public RenderKit getRenderKit(FacesContext context, String renderKitId) {
 34  513
         return (RenderKit) renderKits_.get(renderKitId);
 35  
     }
 36  
 
 37  
     public Iterator getRenderKitIds() {
 38  0
         return renderKits_.keySet().iterator();
 39  
     }
 40  
 
 41  
     public void addRenderKit(String renderKitId, RenderKit renderKit) {
 42  1344
         renderKits_.put(renderKitId, renderKit);
 43  1344
     }
 44  
 
 45  
 }