|
|
605d92 |
diff --git a/src/org/easymock/tests/ReplayStateInvalidUsageTest.java b/src/org/easymock/tests/ReplayStateInvalidUsageTest.java
|
|
|
605d92 |
deleted file mode 100644
|
|
|
605d92 |
index 06e0ac1..0000000
|
|
|
605d92 |
--- a/src/org/easymock/tests/ReplayStateInvalidUsageTest.java
|
|
|
605d92 |
+++ /dev/null
|
|
|
605d92 |
@@ -1,338 +0,0 @@
|
|
|
605d92 |
-/*
|
|
|
605d92 |
- * Copyright (c) 2001-2005 OFFIS. This program is made available under the terms of
|
|
|
605d92 |
- * the MIT License.
|
|
|
605d92 |
- */
|
|
|
605d92 |
-package org.easymock.tests;
|
|
|
605d92 |
-
|
|
|
605d92 |
-import junit.extensions.ExceptionTestCase;
|
|
|
605d92 |
-
|
|
|
605d92 |
-import org.easymock.MockControl;
|
|
|
605d92 |
-
|
|
|
605d92 |
-public class ReplayStateInvalidUsageTest extends ExceptionTestCase {
|
|
|
605d92 |
-
|
|
|
605d92 |
- private MockControl control;
|
|
|
605d92 |
-
|
|
|
605d92 |
- private Exception exception;
|
|
|
605d92 |
-
|
|
|
605d92 |
- public ReplayStateInvalidUsageTest(String name) {
|
|
|
605d92 |
- super(name, IllegalStateException.class);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- protected void setUp() {
|
|
|
605d92 |
- exception = new Exception();
|
|
|
605d92 |
- control = MockControl.createControl(IMethods.class);
|
|
|
605d92 |
- control.replay();
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowObjectWithMinMax() {
|
|
|
605d92 |
- control.expectAndThrow("", exception, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowDoubleWithMinMax() {
|
|
|
605d92 |
- control.expectAndThrow(0.0d, exception, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowFloatWithMinMax() {
|
|
|
605d92 |
- control.expectAndThrow(0.0f, exception, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowLongWithMinMax() {
|
|
|
605d92 |
- control.expectAndThrow(0, exception, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowBooleanWithMinMax() {
|
|
|
605d92 |
- control.expectAndThrow(false, exception, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowObjectWithCount() {
|
|
|
605d92 |
- control.expectAndThrow("", exception, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowDoubleWithCount() {
|
|
|
605d92 |
- control.expectAndThrow(0.0d, exception, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowFloatWithCount() {
|
|
|
605d92 |
- control.expectAndThrow(0.0f, exception, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowLongWithCount() {
|
|
|
605d92 |
- control.expectAndThrow(0, exception, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowBooleanWithCount() {
|
|
|
605d92 |
- control.expectAndThrow(false, exception, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowObjectWithRange() {
|
|
|
605d92 |
- control.expectAndThrow("", exception, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowDoubleWithRange() {
|
|
|
605d92 |
- control.expectAndThrow(0.0d, exception, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowFloatWithRange() {
|
|
|
605d92 |
- control.expectAndThrow(0.0f, exception, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowLongWithRange() {
|
|
|
605d92 |
- control.expectAndThrow(0, exception, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowBooleanWithRange() {
|
|
|
605d92 |
- control.expectAndThrow(false, exception, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowObject() {
|
|
|
605d92 |
- control.expectAndThrow("", exception);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowDouble() {
|
|
|
605d92 |
- control.expectAndThrow(0.0d, exception);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowFloat() {
|
|
|
605d92 |
- control.expectAndThrow(0.0f, exception);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowLong() {
|
|
|
605d92 |
- control.expectAndThrow(0, exception);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndThrowBoolean() {
|
|
|
605d92 |
- control.expectAndThrow(false, exception);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnObjectWithMinMax() {
|
|
|
605d92 |
- control.expectAndReturn("", "", 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnDoubleWithMinMax() {
|
|
|
605d92 |
- control.expectAndReturn(0.0d, 0.0d, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnFloatWithMinMax() {
|
|
|
605d92 |
- control.expectAndReturn(0.0f, 0.0f, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnLongWithMinMax() {
|
|
|
605d92 |
- control.expectAndReturn(0, 0, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnBooleanWithMinMax() {
|
|
|
605d92 |
- control.expectAndReturn(false, false, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnObjectWithCount() {
|
|
|
605d92 |
- control.expectAndReturn("", "", 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnDoubleWithCount() {
|
|
|
605d92 |
- control.expectAndReturn(0.0d, 0.0d, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnFloatWithCount() {
|
|
|
605d92 |
- control.expectAndReturn(0.0f, 0.0f, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnLongWithCount() {
|
|
|
605d92 |
- control.expectAndReturn(0, 0, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnBooleanWithCount() {
|
|
|
605d92 |
- control.expectAndReturn(false, false, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnObjectWithRange() {
|
|
|
605d92 |
- control.expectAndReturn("", "", MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnDoubleWithRange() {
|
|
|
605d92 |
- control.expectAndReturn(0.0d, 0.0d, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnFloatWithRange() {
|
|
|
605d92 |
- control.expectAndReturn(0.0f, 0.0f, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnLongWithRange() {
|
|
|
605d92 |
- control.expectAndReturn(0, 0, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnBooleanWithRange() {
|
|
|
605d92 |
- control.expectAndReturn(false, false, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnObject() {
|
|
|
605d92 |
- control.expectAndReturn("", "");
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnDouble() {
|
|
|
605d92 |
- control.expectAndReturn(0.0d, 0.0d);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnFloat() {
|
|
|
605d92 |
- control.expectAndReturn(0.0f, 0.0f);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnLong() {
|
|
|
605d92 |
- control.expectAndReturn(0, 0);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testExpectAndReturnBoolean() {
|
|
|
605d92 |
- control.expectAndReturn(false, false);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetDefaultMatcher() {
|
|
|
605d92 |
- control.setDefaultMatcher(MockControl.ARRAY_MATCHER);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueObjectWithMinMax() {
|
|
|
605d92 |
- control.setReturnValue("", 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueDoubleWithMinMax() {
|
|
|
605d92 |
- control.setReturnValue(0.0d, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueFloatWithMinMax() {
|
|
|
605d92 |
- control.setReturnValue(0.0f, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueLongWithMinMax() {
|
|
|
605d92 |
- control.setReturnValue(0, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueBooleanWithMinMax() {
|
|
|
605d92 |
- control.setReturnValue(false, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetThrowableWithMinMax() {
|
|
|
605d92 |
- control.setThrowable(exception, 1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetVoidCallableWithMinMax() {
|
|
|
605d92 |
- control.setVoidCallable(1, 2);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetMatcher() {
|
|
|
605d92 |
- control.setMatcher(MockControl.ARRAY_MATCHER);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetDefaultReturnValueObject() {
|
|
|
605d92 |
- control.setDefaultReturnValue("");
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetDefaultReturnValueDouble() {
|
|
|
605d92 |
- control.setDefaultReturnValue(0.0d);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetDefaultReturnValueFloat() {
|
|
|
605d92 |
- control.setDefaultReturnValue(0.0f);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetDefaultReturnValueLong() {
|
|
|
605d92 |
- control.setDefaultReturnValue(0);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetDefaultReturnValueBoolean() {
|
|
|
605d92 |
- control.setDefaultReturnValue(false);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetDefaultThrowable() {
|
|
|
605d92 |
- control.setDefaultThrowable(exception);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetDefaultVoidCallable() {
|
|
|
605d92 |
- control.setDefaultVoidCallable();
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueObjectWithRange() {
|
|
|
605d92 |
- control.setReturnValue("", MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueLongWithRange() {
|
|
|
605d92 |
- control.setReturnValue(0, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueFloatWithRange() {
|
|
|
605d92 |
- control.setReturnValue(0.0f, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueDoubleWithRange() {
|
|
|
605d92 |
- control.setReturnValue(0.0d, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueBooleanWithRange() {
|
|
|
605d92 |
- control.setReturnValue(false, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetThrowableWithRange() {
|
|
|
605d92 |
- control.setThrowable(exception, MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetVoidCallableWithRange() {
|
|
|
605d92 |
- control.setVoidCallable(MockControl.ONE);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueObjectWithCount() {
|
|
|
605d92 |
- control.setReturnValue("", 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueLongWithCount() {
|
|
|
605d92 |
- control.setReturnValue(0, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueFloatWithCount() {
|
|
|
605d92 |
- control.setReturnValue(0.0f, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueDoubleWithCount() {
|
|
|
605d92 |
- control.setReturnValue(0.0d, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueBooleanWithCount() {
|
|
|
605d92 |
- control.setReturnValue(false, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetThrowableWithCount() {
|
|
|
605d92 |
- control.setThrowable(exception, 1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetVoidCallableWithCount() {
|
|
|
605d92 |
- control.setVoidCallable(1);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueObject() {
|
|
|
605d92 |
- control.setReturnValue("");
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueDouble() {
|
|
|
605d92 |
- control.setReturnValue(0.0d);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueFloat() {
|
|
|
605d92 |
- control.setReturnValue(0.0f);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueLong() {
|
|
|
605d92 |
- control.setReturnValue(0);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetReturnValueBoolean() {
|
|
|
605d92 |
- control.setReturnValue(false);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetThrowable() {
|
|
|
605d92 |
- control.setThrowable(exception);
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testSetVoidCallable() {
|
|
|
605d92 |
- control.setVoidCallable();
|
|
|
605d92 |
- }
|
|
|
605d92 |
-
|
|
|
605d92 |
- public void testReplay() {
|
|
|
605d92 |
- control.replay();
|
|
|
605d92 |
- }
|
|
|
605d92 |
-}
|
|
|
605d92 |
\ No newline at end of file
|