Clover coverage report - jMock - 1.0-beta1
Coverage timestamp: Sat Nov 29 2003 19:35:59 GMT
file stats: LOC: 23   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
MethodNameMatcher.java - 100% 100% 100%
coverage
 1   
 /* Copyright (c) 2000-2003, jMock.org. See bundled LICENSE.txt */
 2   
 package org.jmock.matcher;
 3   
 
 4   
 import org.jmock.Constraint;
 5   
 import org.jmock.constraint.IsEqual;
 6   
 import org.jmock.dynamic.Invocation;
 7   
 
 8   
 public class MethodNameMatcher
 9   
         extends StatelessInvocationMatcher {
 10   
     private Constraint constraint;
 11   
 
 12  50
     public MethodNameMatcher(Constraint constraint) {
 13  50
         this.constraint = constraint;
 14   
     }
 15   
 
 16  46
     public MethodNameMatcher(String methodName) {
 17  46
         this(new IsEqual(methodName));
 18   
     }
 19   
 
 20  48
     public boolean matches(Invocation invocation) {
 21  48
         return constraint.eval(invocation.getMethodName());
 22   
     }
 23   
 }