1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.jms;
12
13 import org.mule.api.MessagingException;
14 import org.mule.api.transport.MessageAdapter;
15 import org.mule.transport.AbstractMessageAdapterTestCase;
16 import org.mule.transport.jms.JmsConstants;
17 import org.mule.transport.jms.JmsMessageAdapter;
18
19 public class JmsMessageAdapterTestCase extends AbstractMessageAdapterTestCase
20 {
21
22
23
24
25
26 public MessageAdapter createAdapter(Object payload) throws MessagingException
27 {
28 return new JmsMessageAdapter(payload);
29 }
30
31
32
33
34
35
36 public Object getValidMessage() throws Exception
37 {
38 return JmsConnectorTestCase.getMessage();
39 }
40
41 public void testIllegalSpecification() throws Exception
42 {
43 JmsMessageAdapter a = (JmsMessageAdapter)this.createAdapter(this.getValidMessage());
44
45
46 a.setSpecification(JmsConstants.JMS_SPECIFICATION_102B);
47 a.setSpecification(JmsConstants.JMS_SPECIFICATION_11);
48
49 try
50 {
51
52 a.setSpecification("1.2");
53 }
54 catch (IllegalArgumentException iax)
55 {
56
57 }
58 }
59
60 }