Coverage Report - org.seasar.teeda.core.mock.MockResponseWriter
 
Classes in this File Line Coverage Branch Coverage Complexity
MockResponseWriter
30%
6/20
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.io.PrintWriter;
 20  
 import java.io.Writer;
 21  
 
 22  
 import javax.faces.component.UIComponent;
 23  
 import javax.faces.context.ResponseWriter;
 24  
 
 25  
 import org.seasar.framework.util.SPrintWriter;
 26  
 
 27  
 /**
 28  
  * @author manhole
 29  
  */
 30  2
 public class MockResponseWriter extends ResponseWriter {
 31  
 
 32  2
     private PrintWriter writer = new SPrintWriter();
 33  
 
 34  
     public String getContentType() {
 35  0
         return null;
 36  
     }
 37  
 
 38  
     public String getCharacterEncoding() {
 39  0
         return null;
 40  
     }
 41  
 
 42  
     public void flush() throws IOException {
 43  2
         writer.flush();
 44  2
     }
 45  
 
 46  
     public void startDocument() throws IOException {
 47  1
     }
 48  
 
 49  
     public void endDocument() throws IOException {
 50  0
     }
 51  
 
 52  
     public void startElement(String s, UIComponent uicomponent)
 53  
             throws IOException {
 54  0
     }
 55  
 
 56  
     public void endElement(String s) throws IOException {
 57  0
     }
 58  
 
 59  
     public void writeAttribute(String s, Object obj, String s1)
 60  
             throws IOException {
 61  0
     }
 62  
 
 63  
     public void writeURIAttribute(String s, Object obj, String s1)
 64  
             throws IOException {
 65  0
     }
 66  
 
 67  
     public void writeComment(Object obj) throws IOException {
 68  0
     }
 69  
 
 70  
     public void writeText(Object obj, String s) throws IOException {
 71  0
     }
 72  
 
 73  
     public void writeText(char[] ac, int i, int j) throws IOException {
 74  0
     }
 75  
 
 76  
     public ResponseWriter cloneWithWriter(Writer writer) {
 77  1
         return null;
 78  
     }
 79  
 
 80  
     public void write(char[] cbuf, int off, int len) throws IOException {
 81  0
         writer.write(cbuf, off, len);
 82  0
     }
 83  
 
 84  
     public void close() throws IOException {
 85  0
         writer.close();
 86  0
     }
 87  
 
 88  
 }