1 25 package org.objectweb.easybeans.tests.entity; 26 27 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.entitymanager.ItfEntityManagerTester01; 28 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.entitymanager.SLSBEntityManagerTester01; 29 import org.objectweb.easybeans.tests.common.helper.EJBHelper; 30 import org.testng.annotations.BeforeMethod; 31 import org.testng.annotations.Test; 32 33 43 public class TestEntityManager01 { 44 45 48 public static final int PRIMARY_KEY = 1; 49 50 53 public static final String ENTITY_NAME = "test"; 54 55 58 public static final String ALTERNATIVE_ENTITY_NAME = "test2"; 59 60 63 private ItfEntityManagerTester01 slsbEntityManagerTester01; 64 65 69 @BeforeMethod 70 public void setup() throws Exception { 71 slsbEntityManagerTester01 = EJBHelper.getBeanRemoteInstance(SLSBEntityManagerTester01.class, 72 ItfEntityManagerTester01.class); 73 slsbEntityManagerTester01.removeEBStore(PRIMARY_KEY); 74 } 75 76 81 @Test 82 public void testMerge() { 83 slsbEntityManagerTester01.mergeEBStore(PRIMARY_KEY, ENTITY_NAME, ALTERNATIVE_ENTITY_NAME); 84 } 85 86 91 @Test 92 public void testRefresh() { 93 slsbEntityManagerTester01.refreshEBStore(PRIMARY_KEY, ENTITY_NAME, ALTERNATIVE_ENTITY_NAME); 94 } 95 96 101 @Test 102 public void testContains() { 103 slsbEntityManagerTester01.containsEBStore(PRIMARY_KEY, ENTITY_NAME); 104 } 105 106 } 107 | Popular Tags |