Clover Coverage Report - EasyMock 3.0
Coverage timestamp: sam. mai 8 2010 14:37:27 CEST
0   52   0   -
0   5   -   0
0     -  
1    
 
  IArgumentMatcher       Line # 24 0 - 0 0 - -1.0
 
No Tests
 
1    /**
2    * Copyright 2001-2010 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10    * Unless required by applicable law or agreed to in writing, software
11    * distributed under the License is distributed on an "AS IS" BASIS,
12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    * See the License for the specific language governing permissions and
14    * limitations under the License.
15    */
16   
17    package org.easymock;
18   
19    /**
20    * Decides whether an actual argument is accepted.
21    *
22    * @author OFFIS, Tammo Freese
23    */
 
24    public interface IArgumentMatcher {
25   
26    /**
27    * Returns whether this matcher accepts the given argument.
28    * <p>
29    * Like Object.equals(), it should be aware that the argument passed might
30    * be null and of any type. So you will usually start the method with an
31    * instanceof and/or null check.
32    * <p>
33    * The method should <b>never</b> assert if the argument doesn't match. It
34    * should only return false. EasyMock will take care of asserting if the
35    * call is really unexpected.
36    *
37    * @param argument
38    * the argument
39    * @return whether this matcher accepts the given argument.
40    */
41    boolean matches(Object argument);
42   
43    /**
44    * Appends a string representation of this matcher to the given buffer. In
45    * case of failure, the printed message will show this string to allow to
46    * know which matcher was used for the failing call.
47    *
48    * @param buffer
49    * the buffer to which the string representation is appended.
50    */
51    void appendTo(StringBuffer buffer);
52    }