1 25 package org.objectweb.easybeans.tests.timerservice.timeout.base; 26 27 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType.TIMEOUT; 28 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.ENTERPRISE_BEAN; 29 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.ENTITY_MANAGER; 30 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.ENTITY_MANAGER_FACTORY; 31 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.RESOURCE_MANAGER; 32 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.TIMER; 33 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.USER_TRANSACTION; 34 35 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType; 36 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.OperationChecker; 37 38 39 44 public abstract class BaseTestTimeout { 45 46 49 private OperationChecker checker; 50 51 55 public abstract String getBeanName(); 56 57 61 public void startUp() throws Exception { 62 checker = new OperationChecker(); 63 } 64 65 69 public void testAccessEJB00() throws Exception { 70 check(ENTERPRISE_BEAN); 71 } 72 73 78 public void testAccessResourceManager00() throws Exception { 79 check(RESOURCE_MANAGER); 80 } 81 82 87 public void testAccessEntityManager00() throws Exception { 88 check(ENTITY_MANAGER); 89 } 90 91 96 public void testAccessEntityManagerFactory00() throws Exception { 97 check(ENTITY_MANAGER_FACTORY); 98 } 99 100 105 public void testAccessTimerService00() throws Exception { 106 check(TIMER); 107 108 } 109 110 115 public void testAccessUserTransaction00() throws Exception { 116 check(USER_TRANSACTION); 117 } 118 119 125 public void check(final OperationType type) throws Exception { 126 requestStartTimer(type); 127 checker.check(getBeanName(), TIMEOUT, type); 128 } 129 130 135 public abstract void requestStartTimer(final OperationType type) throws Exception ; 136 137 141 public void tearDownMethod() throws Exception { 142 checker.deleteAll(); 143 } 144 145 } 146 | Popular Tags |