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 JMSContainerInvokerTopicMessageDrivenUnitTestCase extends JMSContainerInvokerSimpleMessageDrivenUnitTest 40 { 41 public JMSContainerInvokerTopicMessageDrivenUnitTestCase(String name) 42 { 43 super(name, testTopic, testTopicProps); 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, 0, 5000), 59 new SendMessageOperation(this, "1"), 60 new CheckMessageSizeOperation(this, 1, 0), 61 new CheckJMSDestinationOperation(this, 0, getDestination().toString()), 62 new CheckMessageIDOperation(this, 0, "1"), 63 new DeactivateOperation(this, mdbInvoker), 64 new SendMessageOperation(this, "2"), 65 new CheckMessageSizeOperation(this, 1, 5000), 66 new ActivateOperation(this, mdbInvoker), 67 new CheckMessageSizeOperation(this, 1, 5000), 68 }; 69 } 70 71 public static junit.framework.Test suite() throws Exception 72 { 73 ClassLoader loader = Thread.currentThread().getContextClassLoader(); 74 return getDeploySetup(JMSContainerInvokerTopicMessageDrivenUnitTestCase.class, 75 loader.getResource("messaging/test-destinations-full-service.xml").toString()); 76 } 77 } 78 | Popular Tags |