KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jtests > jms > conform > message > MessageDefaultTest


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2002 INRIA
4  * Contact: joram-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer(s): Jeff Mesnil (jmesnil@inrialpes.fr)
22  * Contributor(s): ______________________________________.
23  */

24
25 package org.objectweb.jtests.jms.conform.message;
26
27 import org.objectweb.jtests.jms.framework.JMSTestCase;
28 import javax.jms.*;
29 import junit.framework.*;
30
31 /**
32  * Test the default constants of the <code>javax.jms.Message</code> interface.
33  *
34  * @author Jeff Mesnil (jmesnil@inrialpes.fr)
35  * @version $Id: MessageDefaultTest.java,v 1.1 2002/04/21 21:15:18 chirino Exp $
36  */

37 public class MessageDefaultTest extends JMSTestCase {
38
39   /**
40    * test that the <code>DEFAULT_DELIVERY_MODE</code> of <code>javax.jms.Message</code>
41    * corresponds to <code>javax.jms.Delivery.PERSISTENT</code>.
42    */

43   public void testDEFAULT_DELIVERY_MODE() {
44     assertEquals("The delivery mode is persistent by default.\n",
45          DeliveryMode.PERSISTENT, Message.DEFAULT_DELIVERY_MODE);
46   }
47   
48   /**
49    * test that the <code>DEFAULT_PRIORITY</code> of <code>javax.jms.Message</code>
50    * corresponds to 4.
51    */

52   public void testDEFAULT_PRIORITY() {
53     assertEquals("The default priority is 4.\n",
54          4, Message.DEFAULT_PRIORITY);
55   }
56   
57   /**
58    * Method to use this class in a Test suite
59    */

60   public static Test suite() {
61     return new TestSuite(MessageDefaultTest.class);
62   }
63   
64   public MessageDefaultTest(String JavaDoc name) {
65     super(name);
66   }
67 }
68
69
Popular Tags