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