Clover Coverage Report - EasyMock 2.4
Coverage timestamp: mer. juil. 2 2008 02:17:38 CEST
4   31   3   1,33
0   19   0,75   3
3     1  
1    
 
 
  Captures       Line # 12 4 3 100% 1.0
 
  (5)
 
1    /*
2    * Copyright (c) 2003-2008 OFFIS, Henri Tremblay.
3    * This program is made available under the terms of the MIT License.
4    */
5    package org.easymock.internal.matchers;
6   
7    import java.io.Serializable;
8   
9    import org.easymock.Capture;
10    import org.easymock.IArgumentMatcher;
11   
 
12    public class Captures<T> implements IArgumentMatcher, Serializable {
13   
14    private static final long serialVersionUID = 5370646694100653250L;
15   
16    private Capture<T> capture;
17   
 
18  11 toggle public Captures(Capture<T> captured) {
19  11 this.capture = captured;
20    }
21   
 
22  3 toggle public void appendTo(StringBuffer buffer) {
23  3 buffer.append("capture(").append(capture).append(")");
24    }
25   
 
26  12 toggle @SuppressWarnings("unchecked")
27    public boolean matches(Object actual) {
28  12 capture.setValue((T) actual);
29  12 return true;
30    }
31    }