1 22 package org.jboss.test.messagedriven.test; 23 24 import org.jboss.test.messagedriven.support.ActivateOperation; 25 import org.jboss.test.messagedriven.support.CheckJMSDestinationOperation; 26 import org.jboss.test.messagedriven.support.CheckMessageIDOperation; 27 import org.jboss.test.messagedriven.support.CheckMessageSizeOperation; 28 import org.jboss.test.messagedriven.support.DeactivateOperation; 29 import org.jboss.test.messagedriven.support.JMSContainerInvokerSimpleMessageDrivenUnitTest; 30 import org.jboss.test.messagedriven.support.Operation; 31 import org.jboss.test.messagedriven.support.SendMessageOperation; 32 33 39 public class JMSContainerInvokerQueueMessageDrivenUnitTestCase extends JMSContainerInvokerSimpleMessageDrivenUnitTest 40 { 41 public JMSContainerInvokerQueueMessageDrivenUnitTestCase(String name) 42 { 43 super(name, testQueue, testQueueProps); 44 } 45 46 public String getMDBDeployment() 47 { 48 return "jmscontainerinvoker.jar"; 49 } 50 51 public Operation[] getDeliveryActiveOperations() throws Exception 52 { 53 return new Operation[] 54 { 55 new SendMessageOperation(this, "1"), 56 new CheckMessageSizeOperation(this, 0, 5000), 57 new ActivateOperation(this, mdbInvoker), 58 new CheckMessageSizeOperation(this, 1, 0), 59 new CheckJMSDestinationOperation(this, 0, getDestination().toString()), 60 new CheckMessageIDOperation(this, 0, "1"), 61 new DeactivateOperation(this, mdbInvoker), 62 new SendMessageOperation(this, "2"), 63 new CheckMessageSizeOperation(this, 1, 5000), 64 new ActivateOperation(this, mdbInvoker), 65 new CheckMessageSizeOperation(this, 2, 0), 66 new CheckJMSDestinationOperation(this, 1, getDestination().toString()), 67 new CheckMessageIDOperation(this, 1, "2"), 68 }; 69 } 70 71 public static junit.framework.Test suite() throws Exception 72 { 73 ClassLoader loader = Thread.currentThread().getContextClassLoader(); 74 return getDeploySetup(JMSContainerInvokerQueueMessageDrivenUnitTestCase.class, 75 loader.getResource("messaging/test-destinations-full-service.xml").toString()); 76 } 77 } 78 | Popular Tags |