1 25 package org.objectweb.easybeans.tests.environment.reference.simpleentry; 26 27 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType.ON_MESSAGE; 28 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.ANNOTATION_INJECTION_FIELD; 29 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.ANNOTATION_INJECTION_METHOD; 30 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.ANNOTATION_RESOURCES_DECLARATION; 31 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.ANNOTATION_RESOURCE_DECLARATION; 32 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.OVERRIDE_INJECTION_FIELD; 33 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.OVERRIDE_INJECTION_METHOD; 34 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.XML_INJECTION_FIELD; 35 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.XML_INJECTION_METHOD; 36 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.XML_RESOURCE_DECLARATION; 37 38 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType; 39 import org.objectweb.easybeans.tests.common.ejbs.mdb.containermanaged.simpleentry.MDBSimpleEntryEnv; 40 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.OperationChecker; 41 import org.objectweb.easybeans.tests.common.jms.JMSManager; 42 import org.testng.annotations.AfterClass; 43 import org.testng.annotations.BeforeClass; 44 import org.testng.annotations.BeforeMethod; 45 import org.testng.annotations.Test; 46 47 48 56 public class TestSimpleEnvMessageDrivenBean { 57 58 61 private JMSManager jmsQueue; 62 63 66 private OperationChecker checker; 67 68 72 @BeforeClass 73 public void startUp00() throws Exception { 74 jmsQueue = new JMSManager(JMSManager.DEFAULT_QUEUE_CONNECTION_FACTORY, JMSManager.DEFAULT_QUEUE); 76 jmsQueue.sendControlMessage(MDBSimpleEntryEnv.MESSAGE_TYPE, OperationType.UNDEFINED); 78 } 79 80 84 @BeforeMethod 85 public void startUp01() throws Exception { 86 checker = new OperationChecker(); 87 } 88 89 95 @Test 96 public void test00() throws Exception { 97 checker.check(MDBSimpleEntryEnv.class.getName(), ON_MESSAGE, ANNOTATION_RESOURCES_DECLARATION); 98 } 99 100 106 @Test 107 public void test01() throws Exception { 108 checker.check(MDBSimpleEntryEnv.class.getName(), ON_MESSAGE, ANNOTATION_RESOURCE_DECLARATION); 109 } 110 111 117 @Test 118 public void test02() throws Exception { 119 checker.check(MDBSimpleEntryEnv.class.getName(), ON_MESSAGE, XML_RESOURCE_DECLARATION); 120 } 121 122 128 @Test 129 public void test03() throws Exception { 130 checker.check(MDBSimpleEntryEnv.class.getName(), ON_MESSAGE, ANNOTATION_INJECTION_FIELD); 131 } 132 133 139 @Test 140 public void test04() throws Exception { 141 checker.check(MDBSimpleEntryEnv.class.getName(), ON_MESSAGE, ANNOTATION_INJECTION_METHOD); 142 } 143 144 150 @Test 151 public void test05() throws Exception { 152 checker.check(MDBSimpleEntryEnv.class.getName(), ON_MESSAGE, XML_INJECTION_FIELD); 153 } 154 155 161 @Test 162 public void test06() throws Exception { 163 checker.check(MDBSimpleEntryEnv.class.getName(), ON_MESSAGE, XML_INJECTION_METHOD); 164 } 165 166 172 @Test 173 public void test07() throws Exception { 174 checker.check(MDBSimpleEntryEnv.class.getName(), ON_MESSAGE, OVERRIDE_INJECTION_FIELD); 175 } 176 177 183 @Test 184 public void test08() throws Exception { 185 checker.check(MDBSimpleEntryEnv.class.getName(), ON_MESSAGE, OVERRIDE_INJECTION_METHOD); 186 } 187 188 192 @AfterClass 193 public void tearDownClass() throws Exception { 194 jmsQueue.close(); 195 checker.deleteAll(); 196 } 197 } 198 | Popular Tags |