Clover coverage report - jMock - 1.0-beta1
Coverage timestamp: Sat Nov 29 2003 19:35:59 GMT
file stats: LOC: 75   Methods: 14
NCLOC: 56   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
ExpectationValue.java 100% 100% 100% 100%
coverage
 1   
 /* Copyright (c) 2000-2003, jMock.org. See bundled LICENSE.txt */
 2   
 package org.jmock.expectation;
 3   
 
 4   
 
 5   
 
 6   
 public class ExpectationValue extends AbstractExpectation {
 7   
     private Object myExpectedValue;
 8   
     private Object myActualValue;
 9   
 
 10  246
     public ExpectationValue(String name) {
 11  246
         super(name);
 12  246
         clearActual();
 13   
     }
 14   
 
 15  330
     public void clearActual() {
 16  330
         myActualValue = new Null("Nothing");
 17   
     }
 18   
 
 19  6
     public void setActual(int aValue) {
 20  6
         setActual(new Integer(aValue));
 21   
     }
 22   
 
 23  4
     public void setActual(long aValue) {
 24  4
         setActual(new Long(aValue));
 25   
     }
 26   
 
 27  4
     public void setActual(double aValue) {
 28  4
         setActual(new Double(aValue));
 29   
     }
 30   
 
 31  92
     public void setActual(Object aValue) {
 32  92
         myActualValue = aValue;
 33  92
         if (shouldCheckImmediately()) {
 34  60
             verify();
 35   
         }
 36   
     }
 37   
 
 38  4
     public void setActual(boolean aValue) {
 39  4
         setActual(new Boolean(aValue));
 40   
     }
 41   
 
 42  4
     public void setExpected(int aValue) {
 43  4
         setExpected(new Integer(aValue));
 44   
     }
 45   
 
 46  4
     public void setExpected(long aValue) {
 47  4
         setExpected(new Long(aValue));
 48   
     }
 49   
 
 50  4
     public void setExpected(double aValue) {
 51  4
         setExpected(new Double(aValue));
 52   
     }
 53   
 
 54  84
     public void setExpected(Object aValue) {
 55  84
         myExpectedValue = aValue;
 56  84
         setHasExpectations();
 57   
     }
 58   
 
 59  4
     public void setExpected(boolean aValue) {
 60  4
         setExpected(new Boolean(aValue));
 61   
     }
 62   
 
 63  16
     public void setExpectNothing() {
 64  16
         setExpected(new Null("Nothing"));
 65  16
         myActualValue = myExpectedValue;
 66   
     }
 67   
 
 68  164
     public void verify() {
 69  164
         assertEquals(
 70   
                 "did not receive the expected Value.",
 71   
                 myExpectedValue,
 72   
                 myActualValue);
 73   
     }
 74   
 }
 75