Clover coverage report - Maven Clover report
Coverage timestamp: Sun Mar 18 2007 17:42:32 CET
file stats: LOC: 41   Methods: 6
NCLOC: 26   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ExpectationCounterVisitor.java - 100% 100% 100%
coverage
 1    package com.agical.rmock.core.expectation;
 2   
 3    import com.agical.rmock.core.Expectation;
 4    import com.agical.rmock.core.ExpectationVisitor;
 5    import com.agical.rmock.core.Section;
 6   
 7    /**
 8    * @author brolund
 9    *
 10    * (c) 2005 Agical AB
 11    */
 12    public class ExpectationCounterVisitor implements ExpectationVisitor {
 13   
 14    private int count = 0;
 15    private final int maxCount;
 16   
 17  1 public ExpectationCounterVisitor() {
 18  1 this( Integer.MAX_VALUE );
 19    }
 20   
 21  2 public ExpectationCounterVisitor(int maxCount) {
 22  2 super();
 23  2 this.maxCount = maxCount;
 24    }
 25   
 26  5 public boolean visit(Expectation expectation, boolean available) {
 27  5 count++;
 28  5 return count<maxCount;
 29    }
 30   
 31  2 public void enteredSection(Section section) {
 32    }
 33   
 34  2 public void exitedSection() {
 35    }
 36   
 37  2 public int getCount() {
 38  2 return count;
 39    }
 40   
 41    }