1 /*
2 * $Id: JmsTopicTestCase.java 10489 2008-01-23 17:53:38Z dfeist $
3 * --------------------------------------------------------------------------------------
4 * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5 *
6 * The software in this package is published under the terms of the CPAL v1.0
7 * license, a copy of which has been included with this distribution in the
8 * LICENSE.txt file.
9 */
10 package org.mule.transport.jms.integration;
11
12 /**
13 * Message is put to topic with two subscribers
14 */
15 public class JmsTopicTestCase extends AbstractJmsFunctionalTestCase
16 {
17 protected String getConfigResources()
18 {
19 return "providers/activemq/jms-topic.xml";
20 }
21
22 public void testJmsTopic() throws Exception
23 {
24 // One message is sent.
25 dispatchMessage();
26 // The same message is read twice from the same JMS topic.
27 receiveMessage();
28 receiveMessage();
29 }
30
31 public void testMultipleSend() throws Exception
32 {
33 // One message is sent.
34 dispatchMessage();
35 dispatchMessage();
36 // The same message is read twice from the same JMS topic.
37 receiveMessage();
38 receiveMessage();
39 receiveMessage();
40 receiveMessage();
41 }
42 }