Clover coverage report - Maven Clover report
Coverage timestamp: Sun Mar 18 2007 17:42:32 CET
file stats: LOC: 48   Methods: 4
NCLOC: 30   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
SectionDescriberImpl.java 100% 100% 100% 100%
coverage
 1    package com.agical.rmock.core.describe.impl;
 2   
 3    import java.io.StringWriter;
 4   
 5    import com.agical.rmock.core.Section;
 6    import com.agical.rmock.core.describe.SectionDescriber;
 7   
 8    /**
 9    * <em>(c) Agical AB 2005</em>
 10    * @author brolund
 11    *
 12   
 13    */
 14    public class SectionDescriberImpl implements SectionDescriber {
 15   
 16    private final StringWriter output;
 17    private final String indentString;
 18   
 19  15 public SectionDescriberImpl(StringWriter output, String indentString) {
 20  15 this.output = output;
 21  15 this.indentString = indentString;
 22    }
 23   
 24  23 public void describeSectionEntered(Section section, int level ) {
 25  23 output.write( " " ); // To compensate for "-> (N/A)", should be in the visitor
 26  23 writeIndent(level);
 27  23 output.write( section.getType());
 28  23 output.write(":");
 29  23 output.write(section.getDescription());
 30    //output.write("\n");
 31    //writeIndent(level);
 32  23 output.write(" {\n");
 33    }
 34   
 35  46 private void writeIndent(int level) {
 36  46 for( int i = 0; i < level; i++ ) {
 37  28 output.write( indentString );
 38    }
 39    }
 40   
 41  23 public void describeSectionExited(Section section, int level ) {
 42    //output.write("\n");
 43  23 output.write( " " ); // To compensate for "-> (N/A)", should be in the visitor
 44  23 writeIndent(level);
 45  23 output.write("}\n");
 46    }
 47   
 48    }