Coverage Report - org.seasar.teeda.core.mock.MockViewHandlerImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
MockViewHandlerImpl
86%
12/14
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.io.IOException;
 19  
 import java.util.Locale;
 20  
 
 21  
 import javax.faces.FacesException;
 22  
 import javax.faces.component.UIViewRoot;
 23  
 import javax.faces.context.FacesContext;
 24  
 
 25  
 /**
 26  
  * @author shot
 27  
  */
 28  1370
 public class MockViewHandlerImpl extends MockViewHandler {
 29  
 
 30  1370
     private Locale locale_ = Locale.getDefault();
 31  
 
 32  
     public Locale calculateLocale(FacesContext context) {
 33  8
         return locale_;
 34  
     }
 35  
 
 36  
     public String calculateRenderKitId(FacesContext context) {
 37  0
         return null;
 38  
     }
 39  
 
 40  
     public UIViewRoot createView(FacesContext context, String viewId) {
 41  9
         UIViewRoot root = new UIViewRoot();
 42  9
         root.setViewId(viewId);
 43  9
         return root;
 44  
     }
 45  
 
 46  
     public String getActionURL(FacesContext context, String viewId) {
 47  13
         return viewId;
 48  
     }
 49  
 
 50  
     public String getResourceURL(FacesContext context, String path) {
 51  7
         return path;
 52  
     }
 53  
 
 54  
     public void renderView(FacesContext context, UIViewRoot viewToRender)
 55  
             throws IOException, FacesException {
 56  0
     }
 57  
 
 58  
     public UIViewRoot restoreView(FacesContext context, String viewId) {
 59  3
         return null;
 60  
     }
 61  
 
 62  
     public void writeState(FacesContext context) throws IOException {
 63  10
     }
 64  
 
 65  
     public void setLocale(Locale locale) {
 66  3
         locale_ = locale;
 67  3
     }
 68  
 
 69  
 }