| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 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") |
|
|
|
| 100% |
Uncovered Elements: 0 (19) |
Complexity: 6 |
Complexity Density: 0,46 |
|
| 14 |
|
public class NiceMockControlLongCompatibleReturnValueTest { |
| 15 |
|
|
| 16 |
|
MockControl<IMethods> control; |
| 17 |
|
|
| 18 |
|
IMethods mock; |
| 19 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0,33 |
|
| 20 |
5
|
@Before... |
| 21 |
|
public void setup() { |
| 22 |
5
|
control = MockControl.createNiceControl(IMethods.class); |
| 23 |
5
|
mock = control.getMock(); |
| 24 |
5
|
control.replay(); |
| 25 |
|
} |
| 26 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
1
PASS
|
|
| 27 |
1
|
@Test... |
| 28 |
|
public void byteReturningValue() { |
| 29 |
1
|
assertEquals((byte) 0, mock.byteReturningMethod(12)); |
| 30 |
1
|
control.verify(); |
| 31 |
|
} |
| 32 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
1
PASS
|
|
| 33 |
1
|
@Test... |
| 34 |
|
public void shortReturningValue() { |
| 35 |
1
|
assertEquals((short) 0, mock.shortReturningMethod(12)); |
| 36 |
1
|
control.verify(); |
| 37 |
|
} |
| 38 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
1
PASS
|
|
| 39 |
1
|
@Test... |
| 40 |
|
public void charReturningValue() { |
| 41 |
1
|
assertEquals((char) 0, mock.charReturningMethod(12)); |
| 42 |
1
|
control.verify(); |
| 43 |
|
} |
| 44 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
1
PASS
|
|
| 45 |
1
|
@Test... |
| 46 |
|
public void intReturningValue() { |
| 47 |
1
|
assertEquals(0, mock.intReturningMethod(12)); |
| 48 |
1
|
control.verify(); |
| 49 |
|
} |
| 50 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
1
PASS
|
|
| 51 |
1
|
@Test... |
| 52 |
|
public void longReturningValue() { |
| 53 |
1
|
assertEquals((long) 0, mock.longReturningMethod(12)); |
| 54 |
1
|
control.verify(); |
| 55 |
|
} |
| 56 |
|
} |