|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.jmock.core.VerifyingTestCase
org.jmock.core.MockObjectSupportTestCase
org.jmock.MockObjectTestCase
com.bm.testsuite.BaseTest
com.bm.testsuite.mocked.MockedSessionBeanFixture<T>
T - -
the type of the bena to test.public abstract class MockedSessionBeanFixture<T>
This class enables the testing of Seteless/Statefull Session beans and JBoss Service classes under Mock-Isolation control. All JSR 220 (EJB 3) fields will be injected as JMock objects.
| Field Summary |
|---|
| Fields inherited from class org.jmock.core.MockObjectSupportTestCase |
|---|
ANYTHING, NOT_NULL, NULL |
| Constructor Summary | |
|---|---|
MockedSessionBeanFixture(java.lang.Class<T> beanToTest)
Default constructor. |
|
| Method Summary | |
|---|---|
protected T |
getBeanToTest()
Returns the bean to test. |
protected org.jmock.Mock |
getMockControl(java.lang.Class<?> interfaze)
Returns the mock controll to the given property. |
protected void |
setUp()
|
protected void |
setValueForField(java.lang.String fieldName,
java.lang.Object toSet)
Sets a value for a field in the tested-bean instance. |
protected void |
tearDown()
|
| Methods inherited from class com.bm.testsuite.BaseTest |
|---|
assertCollectionsEqual, assertFalse, assertFalse, assertInstanceOf, assertInstanceOf, setValueForField, testNothing |
| Methods inherited from class org.jmock.MockObjectTestCase |
|---|
atLeastOnce, defaultMockNameForType, mock, mock, never, newCoreMock, once, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, throwException |
| Methods inherited from class org.jmock.core.MockObjectSupportTestCase |
|---|
and, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, isA, newDummy, newDummy, newDummy, not, or, same, stringContains |
| Methods inherited from class org.jmock.core.VerifyingTestCase |
|---|
registerToVerify, runBare, unregisterToVerify, verify |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MockedSessionBeanFixture(java.lang.Class<T> beanToTest)
beanToTest - -
the bean to test.| Method Detail |
|---|
protected org.jmock.Mock getMockControl(java.lang.Class<?> interfaze)
interfaze - -
the name of the property
protected T getBeanToTest()
protected void setValueForField(java.lang.String fieldName,
java.lang.Object toSet)
fieldName - -
the name of the fieldtoSet - -
the value to set
protected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.ExceptionTestCase.setUp()
protected void tearDown()
throws java.lang.Exception
tearDown in class junit.framework.TestCasejava.lang.ExceptionTestCase.tearDown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||