Clover coverage report - jMock - 1.0-beta1
Coverage timestamp: Sat Nov 29 2003 19:35:59 GMT
file stats: LOC: 30   Methods: 3
NCLOC: 14   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
IsSame.java - 66.7% 66.7% 66.7%
coverage coverage
 1   
 /* Copyright (c) 2000-2003, jMock.org. See bundled LICENSE.txt */
 2   
 package org.jmock.constraint;
 3   
 
 4   
 import org.jmock.Constraint;
 5   
 
 6   
 /**
 7   
  * Is the value the same object as another value?
 8   
  */
 9   
 public class IsSame implements Constraint {
 10   
     private Object _object;
 11   
 
 12   
     /**
 13   
      * Creates a new instance of IsSame
 14   
      * 
 15   
      * @param o The predicate evaluates to true only when the argument is
 16   
      *          this object.
 17   
      */
 18  2
     public IsSame(Object o) {
 19  2
         _object = o;
 20   
     }
 21   
 
 22  4
     public boolean eval(Object arg) {
 23  4
         return arg == _object;
 24   
     }
 25   
 
 26  0
     public String toString() {
 27  0
         return "the same object as <" + _object + ">";
 28   
     }
 29   
 }
 30