| org.mockejb.test.entity.EntityBeanTest
EntityBeanTest | public class EntityBeanTest extends TestCase (Code) | | Demonstrates CMP Entity bean support.
MockEJB uses CGLIB to dynamically generate implementation classes
for abstract entity bean classes.
MockEJB fully supports CMP field getters/setters.
The rest of the container's support (such as finders and CMR) has to be implemented using
Aspect/Interceptor framework as shown below.
|
Inner Class :class PersonCreateAspect implements Aspect | |
Inner Class :class PersonFinderAspect implements Aspect | |
Inner Class :class PersonCMRAspect implements Aspect | |
Inner Class :class SelectAllAspect implements Aspect | |
setUp | public void setUp() throws Exception(Code) | | Sets up mock container, JNDI context and deploy EJBs that we need.
|
tearDown | public void tearDown()(Code) | | |
testCMRUsingAdd | public void testCMRUsingAdd() throws Exception(Code) | | Demonstrates the use of CMR using standard EJB API.
First, we populate CMR collection using "create" and "set"
methods, after that we can begin using it.
For example, you can setup CMR this way in the "setUp" method of a test class and
then call Session facade that manipulates CMR collections in the test.
Alternatively, you can setup CMR using interceptors ( see "testCMRUsingInterceptor").
|
testCMRUsingInterceptor | public void testCMRUsingInterceptor() throws Exception(Code) | | Demonstrates how to set up CMR using interceptors/aspects.
|
testCreate | public void testCreate() throws Exception(Code) | | Demonstrates the create/ejbCreate support
|
testEasyMockWithFindByPrimaryKey | public void testEasyMockWithFindByPrimaryKey() throws Exception(Code) | | Demonstrates how mock entities can be setup using
EasyMock and EntityDatabase.
|
testEjbHomeEjbSelect | public void testEjbHomeEjbSelect() throws Exception(Code) | | Demonstrates the support of ejbHome and ejbSelect methods
|
testFindByPrimaryKey | public void testFindByPrimaryKey() throws Exception(Code) | | Demonstrates the use of findByprimaryKey
|
testFinder | public void testFinder() throws Exception(Code) | | Demonstrates the usage of a finder (other than findByPrimaryKey)
|
|
|