Clover Coverage Report - EasyMock 2.4
Coverage timestamp: mer. juil. 2 2008 02:17:38 CEST
13   56   6   2,17
0   40   0,46   6
6     1  
1    
 
 
  NiceMockControlLongCompatibleReturnValueTest       Line # 14 13 6 100% 1.0
 
  (5)
 
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 org.easymock.MockControl;
10    import org.junit.Before;
11    import org.junit.Test;
12   
13    @SuppressWarnings("deprecation")
 
14    public class NiceMockControlLongCompatibleReturnValueTest {
15   
16    MockControl<IMethods> control;
17   
18    IMethods mock;
19   
 
20  5 toggle @Before
21    public void setup() {
22  5 control = MockControl.createNiceControl(IMethods.class);
23  5 mock = control.getMock();
24  5 control.replay();
25    }
26   
 
27  1 toggle @Test
28    public void byteReturningValue() {
29  1 assertEquals((byte) 0, mock.byteReturningMethod(12));
30  1 control.verify();
31    }
32   
 
33  1 toggle @Test
34    public void shortReturningValue() {
35  1 assertEquals((short) 0, mock.shortReturningMethod(12));
36  1 control.verify();
37    }
38   
 
39  1 toggle @Test
40    public void charReturningValue() {
41  1 assertEquals((char) 0, mock.charReturningMethod(12));
42  1 control.verify();
43    }
44   
 
45  1 toggle @Test
46    public void intReturningValue() {
47  1 assertEquals(0, mock.intReturningMethod(12));
48  1 control.verify();
49    }
50   
 
51  1 toggle @Test
52    public void longReturningValue() {
53  1 assertEquals((long) 0, mock.longReturningMethod(12));
54  1 control.verify();
55    }
56    }