1 5 package org.easymock.tests; 6 7 import junit.framework.TestCase; 8 9 import org.easymock.MockControl; 10 11 public class NiceMockControlLongCompatibleReturnValueTest extends TestCase { 12 13 MockControl<IMethods> control; 14 15 IMethods mock; 16 17 protected void setUp() { 18 control = MockControl.createNiceControl(IMethods.class); 19 mock = control.getMock(); 20 control.replay(); 21 } 22 23 public void testByteReturningValue() { 24 assertEquals(0, mock.byteReturningMethod(12)); 25 control.verify(); 26 } 27 28 public void testShortReturningValue() { 29 assertEquals(0, mock.shortReturningMethod(12)); 30 control.verify(); 31 } 32 33 public void testCharReturningValue() { 34 assertEquals(0, mock.charReturningMethod(12)); 35 control.verify(); 36 } 37 38 public void testIntReturningValue() { 39 assertEquals(0, mock.intReturningMethod(12)); 40 control.verify(); 41 } 42 43 public void testLongReturningValue() { 44 assertEquals(0, mock.longReturningMethod(12)); 45 control.verify(); 46 } 47 } | Popular Tags |