Clover Coverage Report - EasyMock 3.0
Coverage timestamp: sam. mai 8 2010 14:37:27 CEST
7   51   3   3,5
0   24   0,43   2
2     1,5  
1    
 
  ExpectedMethodCallTest       Line # 31 7 0% 3 1 88,9% 0.8888889
 
  (2)
 
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.tests;
18   
19    import static org.junit.Assert.*;
20   
21    import java.lang.reflect.Method;
22   
23    import org.easymock.internal.ExpectedInvocation;
24    import org.easymock.internal.Invocation;
25    import org.junit.Before;
26    import org.junit.Test;
27   
28    /**
29    * @author OFFIS, Tammo Freese
30    */
 
31    public class ExpectedMethodCallTest {
32   
33    private ExpectedInvocation call;
34   
 
35  2 toggle @Before
36    public void setup() throws SecurityException, NoSuchMethodException {
37  2 final Object[] arguments1 = new Object[] { "" };
38  2 final Method m = Object.class.getMethod("equals", new Class[] { Object.class });
39  2 call = new ExpectedInvocation(new Invocation(null, m, arguments1), null);
40    }
41   
 
42  2 toggle @Test
43    public void testHashCode() {
44  2 try {
45  2 call.hashCode();
46  0 fail();
47    } catch (final UnsupportedOperationException expected) {
48  2 assertEquals("hashCode() is not implemented", expected.getMessage());
49    }
50    }
51    }