KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > jbossmessaging > test > JoramUnitTestCase


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.jbossmessaging.test;
23
24 import junit.framework.Test;
25 import junit.framework.TestSuite;
26
27 import org.jboss.test.JBossTestSetup;
28 import org.jboss.test.jbossmessaging.JMSTestCase;
29
30 import org.objectweb.jtests.jms.conform.connection.ConnectionTest;
31 import org.objectweb.jtests.jms.conform.connection.TopicConnectionTest;
32 import org.objectweb.jtests.jms.conform.message.MessageBodyTest;
33 import org.objectweb.jtests.jms.conform.message.MessageDefaultTest;
34 import org.objectweb.jtests.jms.conform.message.MessageTypeTest;
35 import org.objectweb.jtests.jms.conform.message.headers.MessageHeaderTest;
36 import org.objectweb.jtests.jms.conform.message.properties.JMSXPropertyTest;
37 import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyConversionTest;
38 import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyTest;
39 import org.objectweb.jtests.jms.conform.queue.QueueBrowserTest;
40 import org.objectweb.jtests.jms.conform.queue.TemporaryQueueTest;
41 import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest;
42 import org.objectweb.jtests.jms.conform.selector.SelectorTest;
43 import org.objectweb.jtests.jms.conform.session.QueueSessionTest;
44 import org.objectweb.jtests.jms.conform.session.SessionTest;
45 import org.objectweb.jtests.jms.conform.session.TopicSessionTest;
46 import org.objectweb.jtests.jms.conform.session.UnifiedSessionTest;
47 import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
48
49 /**
50  * Joram unit tests
51  *
52  * @author <a HREF="mailto:richard.achmatowicz@jboss.com">Richard Achmatowicz</a>
53  * @version $Revision: 37406 $
54  */

55 public class JoramUnitTestCase extends JMSTestCase
56 {
57    public JoramUnitTestCase(String JavaDoc name)
58    {
59       super(name);
60    }
61
62    public static junit.framework.Test suite() throws Exception JavaDoc
63    {
64       TestSuite suite = new TestSuite();
65
66       suite.addTest(ConnectionTest.suite());
67       suite.addTest(TopicConnectionTest.suite());
68       suite.addTest(MessageBodyTest.suite());
69       suite.addTest(MessageDefaultTest.suite());
70       suite.addTest(MessageTypeTest.suite());
71       suite.addTest(MessageHeaderTest.suite());
72       suite.addTest(JMSXPropertyTest.suite());
73       suite.addTest(MessagePropertyConversionTest.suite());
74       suite.addTest(MessagePropertyTest.suite());
75       suite.addTest(QueueBrowserTest.suite());
76       suite.addTest(TemporaryQueueTest.suite());
77       suite.addTest(SelectorSyntaxTest.suite());
78       suite.addTest(SelectorTest.suite());
79       suite.addTest(QueueSessionTest.suite());
80       suite.addTest(SessionTest.suite());
81       suite.addTest(TopicSessionTest.suite());
82       suite.addTest(UnifiedSessionTest.suite());
83       suite.addTest(TemporaryTopicTest.suite());
84
85       // Create an initializer for the test suite
86
Test wrapper = new JBossTestSetup(suite)
87       {
88          protected void setUp() throws Exception JavaDoc
89          {
90             super.setUp();
91             ClassLoader JavaDoc loader = Thread.currentThread().getContextClassLoader();
92         String JavaDoc resourceName = getJMSResourceRelativePathname("test-destinations-service.xml") ;
93
94             deploy (loader.getResource(resourceName).toString());
95          }
96          protected void tearDown() throws Exception JavaDoc
97          {
98             super.tearDown();
99             ClassLoader JavaDoc loader = Thread.currentThread().getContextClassLoader();
100         String JavaDoc resourceName = getJMSResourceRelativePathname("test-destinations-service.xml") ;
101
102             undeploy (loader.getResource(resourceName).toString());
103          }
104       };
105
106       return wrapper;
107    }
108
109    public static void main(String JavaDoc[] args)
110    {
111    }
112 } // SecurityTest
113
Popular Tags