Clover coverage report - Maven Clover report
Coverage timestamp: Sun Mar 18 2007 17:42:32 CET
file stats: LOC: 35   Methods: 2
NCLOC: 17   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
UnclosedSectionException.java 100% 100% 100% 100%
coverage
 1    package com.agical.rmock.core.exception;
 2   
 3    import java.util.Stack;
 4   
 5    import com.agical.rmock.core.Section;
 6   
 7    /**
 8    * <em>(c) Agical AB 2005</em>
 9    * @author brolund
 10    *
 11   
 12    */
 13    public class UnclosedSectionException extends RuntimeException {
 14   
 15    /**
 16    *
 17    */
 18    private static final long serialVersionUID = 1L;
 19   
 20    /**
 21    * @param sectionStack
 22    */
 23  1 public UnclosedSectionException(Stack sectionStack) {
 24  1 super(createMessage(sectionStack));
 25    }
 26   
 27  1 static String createMessage(Stack sectionStack) {
 28  1 StringBuffer stringBuffer = new StringBuffer( "\nThe following sections must be closed: " );
 29  1 while( sectionStack.size() > 1 ) {
 30  1 Section section = (Section) sectionStack.pop();
 31  1 stringBuffer.append( "\n - " ).append( section.getType() ).append( ":" ).append( section.getDescription() );
 32    }
 33  1 return stringBuffer.toString();
 34    }
 35    }