KickJava   Java API By Example, From Geeks To Geeks.

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


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

3 package org.jmock.core.matcher;
4
5
6 public class InvokeAtLeastOnceMatcher
7         extends InvokedRecorder
8 {
9     public void verify() {
10         verifyHasBeenInvoked();
11     }
12
13     public boolean hasDescription() {
14         return true;
15     }
16
17     public StringBuffer JavaDoc describeTo( StringBuffer JavaDoc buffer ) {
18         buffer.append("expected at least once");
19         if (hasBeenInvoked()) {
20             buffer.append(" and has been invoked");
21         }
22         return buffer;
23     }
24 }
25
Popular Tags