Clover coverage report - jMock - 1.0-beta1
Coverage timestamp: Sat Nov 29 2003 19:35:59 GMT
file stats: LOC: 28   Methods: 3
NCLOC: 16   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
And.java - 75% 66.7% 71.4%
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   
  * Calculates the logical conjunction of two constraints.
 8   
  * Evaluation is shortcut, so that the second constraint is not
 9   
  * called if the first constraint returns <code>false</code>.
 10   
  */
 11   
 public class And
 12   
         implements Constraint {
 13   
     Constraint _p1, _p2;
 14   
 
 15  8
     public And(Constraint p1, Constraint p2) {
 16  8
         _p1 = p1;
 17  8
         _p2 = p2;
 18   
     }
 19   
 
 20  8
     public boolean eval(Object o) {
 21  8
         return _p1.eval(o) && _p2.eval(o);
 22   
     }
 23   
 
 24  0
     public String toString() {
 25  0
         return "(" + _p1 + " and " + _p2 + ")";
 26   
     }
 27   
 }
 28