Clover Coverage Report - EasyMock 2.4
Coverage timestamp: mer. juil. 2 2008 02:17:38 CEST
8   45   2   4
0   29   0,25   2
2     1  
1    
 
 
  MatchableArgumentsTest       Line # 16 8 2 100% 1.0
 
  (1)
 
1    /*
2    * Copyright (c) 2001-2008 OFFIS, Tammo Freese.
3    * This program is made available under the terms of the MIT License.
4    */
5    package org.easymock.tests;
6   
7    import static org.junit.Assert.*;
8   
9    import java.lang.reflect.Method;
10   
11    import org.easymock.internal.ExpectedInvocation;
12    import org.easymock.internal.Invocation;
13    import org.junit.Before;
14    import org.junit.Test;
15   
 
16    public class MatchableArgumentsTest {
17   
18    private Object[] arguments;
19   
20    private Object[] arguments2;
21   
 
22  1 toggle @Before
23    public void setup() {
24  1 arguments = new Object[] { "" };
25  1 arguments2 = new Object[] { "", "" };
26    }
27   
 
28  1 toggle @Test
29    public void testEquals() throws SecurityException, NoSuchMethodException {
30  1 Method toPreventNullPointerExceptionm = Object.class.getMethod(
31    "toString", new Class[] {});
32   
33  1 Object mock = new Object();
34   
35  1 ExpectedInvocation matchableArguments = new ExpectedInvocation(
36    new Invocation(mock, toPreventNullPointerExceptionm, arguments),
37    null);
38  1 ExpectedInvocation nonEqualMatchableArguments = new ExpectedInvocation(
39    new Invocation(mock, toPreventNullPointerExceptionm, arguments2),
40    null);
41   
42  1 assertFalse(matchableArguments.equals(null));
43  1 assertFalse(matchableArguments.equals(nonEqualMatchableArguments));
44    }
45    }