01: package org.mockejb.test;
02:
03: import org.mockejb.EntityBeanSubclass;
04: import org.mockejb.test.entity.AddressBean;
05:
06: import junit.framework.TestCase;
07:
08: /**
09: *
10: * @author Alexander Ananiev
11: */
12: public class EntityBeanSubclassTest extends TestCase {
13:
14: protected void setUp() throws Exception {
15: super .setUp();
16: }
17:
18: /**
19: * Constructor for EntityBeanSubclassTest.
20: * @param testCaseName
21: */
22: public EntityBeanSubclassTest(String testCaseName) {
23: super (testCaseName);
24: }
25:
26: public void testSetGet() throws Exception {
27:
28: EntityBeanSubclass addressSubclass = EntityBeanSubclass
29: .newInstance(AddressBean.class);
30:
31: AddressBean addressBean = (AddressBean) addressSubclass
32: .create();
33:
34: addressBean.setCity("test");
35: assertEquals("test", addressBean.getCity());
36:
37: //addressBean.setPrimaryKey(1);
38: //int pk = addressBean.getPrimaryKey();
39: //assertEquals(1, pk);
40:
41: }
42: }
|