KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmock > core > matcher > NoArgumentsMatcher


1 /* Copyright (c) 2000-2004 jMock.org
2  */

3 package org.jmock.core.matcher;
4
5 import org.jmock.core.Invocation;
6
7
8 public class NoArgumentsMatcher extends StatelessInvocationMatcher
9 {
10     public static final NoArgumentsMatcher INSTANCE = new NoArgumentsMatcher();
11
12     public boolean matches( Invocation invocation ) {
13         return invocation.parameterValues.isEmpty();
14     }
15
16     public StringBuffer JavaDoc describeTo( StringBuffer JavaDoc buffer ) {
17         return buffer.append("(no arguments)");
18     }
19 }
20
Popular Tags