Coverage Report - org.seasar.teeda.core.mock.MockResponseStateManagerImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
MockResponseStateManagerImpl
88%
7/8
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  
 
 20  
 import javax.faces.application.StateManager.SerializedView;
 21  
 import javax.faces.context.FacesContext;
 22  
 
 23  
 import org.seasar.teeda.core.application.TreeStructure;
 24  
 
 25  
 /**
 26  
  * @author shot
 27  
  * 
 28  
  */
 29  3
 public class MockResponseStateManagerImpl extends MockResponseStateManager {
 30  
 
 31  
     private TreeStructure struct_;
 32  
 
 33  
     private Object state_;
 34  
 
 35  
     public void writeState(FacesContext context, SerializedView state)
 36  
             throws IOException {
 37  
         //TODO need to notify something for test?
 38  0
     }
 39  
 
 40  
     public Object getTreeStructureToRestore(FacesContext context, String viewId) {
 41  1
         return struct_;
 42  
     }
 43  
 
 44  
     public Object getComponentStateToRestore(FacesContext context) {
 45  1
         return state_;
 46  
     }
 47  
 
 48  
     public void setTreeStructureToRestore(TreeStructure struct) {
 49  2
         struct_ = struct;
 50  2
     }
 51  
 
 52  
     public void setComponentStateToRestore(Object state) {
 53  2
         state_ = state;
 54  2
     }
 55  
 
 56  
 }