View Javadoc
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 public MethodNameMatcher(Constraint constraint) { 13 this.constraint = constraint; 14 } 15 16 public MethodNameMatcher(String methodName) { 17 this(new IsEqual(methodName)); 18 } 19 20 public boolean matches(Invocation invocation) { 21 return constraint.eval(invocation.getMethodName()); 22 } 23 }

This page was automatically generated by Maven