View Javadoc

1   /*
2    * $Id: JmsQueueWithCompressionTestCase.java 19191 2010-08-25 21:05:23Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.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  
11  package org.mule.transport.jms.integration;
12  
13  import org.mule.tck.testmodels.fruit.Apple;
14  
15  import org.junit.Test;
16  
17  /**
18   * Message is sent to and received from simple queue using compression in between
19   */
20  public class JmsQueueWithCompressionTestCase extends AbstractJmsFunctionalTestCase
21  {
22      protected String getConfigResources()
23      {
24          return "integration/jms-queue-with-compression.xml";
25      }
26  
27      @Test
28      public void testJmsQueue() throws Exception
29      {
30          // Lets test it doesn't blow up with serialized objects
31          dispatchMessage(new Apple());
32          receiveMessage();
33          receive(scenarioNotReceive);
34      }
35  
36      @Test
37      public void testMultipleSend() throws Exception
38      {
39          dispatchMessage();
40          dispatchMessage();
41          dispatchMessage();
42          receiveMessage();
43          receiveMessage();
44          receiveMessage();
45          receive(scenarioNotReceive);
46      }
47  }