001: /*
002: * The Apache Software License, Version 1.1
003: *
004: *
005: * Copyright (c) 2002 The Apache Software Foundation. All rights
006: * reserved.
007: *
008: * Redistribution and use in source and binary forms, with or without
009: * modification, are permitted provided that the following conditions
010: * are met:
011: *
012: * 1. Redistributions of source code must retain the above copyright
013: * notice, this list of conditions and the following disclaimer.
014: *
015: * 2. Redistributions in binary form must reproduce the above copyright
016: * notice, this list of conditions and the following disclaimer in
017: * the documentation and/or other materials provided with the
018: * distribution.
019: *
020: * 3. The end-user documentation included with the redistribution,
021: * if any, must include the following acknowledgment:
022: * "This product includes software developed by the
023: * Apache Software Foundation (http://www.apache.org/)."
024: * Alternately, this acknowledgment may appear in the software itself,
025: * if and wherever such third-party acknowledgments normally appear.
026: *
027: * 4. The names "WSIF" and "Apache Software Foundation" must
028: * not be used to endorse or promote products derived from this
029: * software without prior written permission. For written
030: * permission, please contact apache@apache.org.
031: *
032: * 5. Products derived from this software may not be called "Apache",
033: * nor may "Apache" appear in their name, without prior written
034: * permission of the Apache Software Foundation.
035: *
036: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
037: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
038: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
039: * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
040: * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
041: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
042: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
043: * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
044: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
045: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
046: * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
047: * SUCH DAMAGE.
048: * ====================================================================
049: *
050: * This software consists of voluntary contributions made by many
051: * individuals on behalf of the Apache Software Foundation and was
052: * originally based on software copyright (c) 2001, 2002, International
053: * Business Machines, Inc., http://www.apache.org. For more
054: * information on the Apache Software Foundation, please see
055: * <http://www.apache.org/>.
056: */
057:
058: package util;
059:
060: import faults.FaultMsgTest;
061: import headers.HeadersTest;
062: import inout.InoutTest;
063: import interop.InteropDocTest;
064: import interop.InteropDocWrappedTest;
065: import invocation.DynamicInvokerTest;
066:
067: import jms.JmsFaultTest;
068: import jms.JmsTest;
069: import jndi.JNDIAddressBookTest;
070: import junit.framework.Test;
071: import junit.framework.TestSuite;
072:
073: import mime.MimeTest;
074: import providers.PlugableProvidersTest;
075: import providers.ProvidersInitialisationTest;
076: import serialization.SerializationTest;
077: import simpletypes.SOAPENCTest;
078: import soap.InputPartsTest;
079: import soap.MissingInputPartTest;
080: import soap.OutputPartsTest;
081: import soapinterop.InteropTest;
082: import stockquote.StockquoteTest;
083: import wsdl.WsdlLoadingTest;
084: import zipcode.ZIPCodeTest;
085:
086: import addressbook.AddressBookTest;
087: import async.AsyncTests;
088: import chartype.CharTest;
089: import docStyle.MessagingAttachmentsTest;
090: import docStyle.NWBankTest;
091: import docStyle.ZipCodeAxisTest;
092:
093: /**
094: * Run JUnit tests on WSIF code.
095: * Add new tests to the suite() method.
096: * Comment out lines for tests not required.
097: *
098: * @author Owen Burroughs
099: */
100:
101: public class WSIFTestRunner {
102:
103: public static void main(String[] args) {
104: TestUtilities.startListeners();
105: junit.textui.TestRunner.run(suite());
106: TestUtilities.stopListeners();
107: }
108:
109: public static Test suite() {
110: TestSuite suite = new TestSuite("All WSIF Tests");
111:
112: // Check all files for the dreaded ^M character! If you set
113: // fix=on in the wsif.test.properties file, this test will
114: // not only check the files but also fix them.
115: //suite.addTest(new TestSuite(FileCharacterTest.class));
116:
117: // Test the initialisation of WSIF providers. This test needs to be
118: // the FIRST of the functional tests as after this, WSIF will already
119: // have been initialised.
120: suite.addTest(new TestSuite(ProvidersInitialisationTest.class));
121:
122: //suite.addTest(new TestSuite(ShoppingCartTest.class));
123: addIfAvaliable(suite, "ShoppingCartTest");
124: suite.addTest(new TestSuite(AsyncTests.class));
125: suite.addTest(new TestSuite(HeadersTest.class));
126: suite.addTest(new TestSuite(FaultMsgTest.class));
127: suite.addTest(new TestSuite(StockquoteTest.class));
128: suite.addTest(new TestSuite(AddressBookTest.class));
129: suite.addTest(new TestSuite(WsdlLoadingTest.class));
130: suite.addTest(new TestSuite(InoutTest.class));
131: suite.addTest(new TestSuite(DynamicInvokerTest.class));
132: suite.addTest(new TestSuite(ZIPCodeTest.class));
133: suite.addTest(new TestSuite(InteropTest.class));
134: suite.addTest(new TestSuite(JNDIAddressBookTest.class));
135: suite.addTest(new TestSuite(PlugableProvidersTest.class));
136: suite.addTest(new TestSuite(InputPartsTest.class));
137: suite.addTest(new TestSuite(OutputPartsTest.class));
138: suite.addTest(new TestSuite(WildcardTest.class));
139: suite.addTest(new TestSuite(ZipCodeAxisTest.class));
140: suite.addTest(new TestSuite(NWBankTest.class));
141: suite.addTest(new TestSuite(InteropDocTest.class));
142: suite.addTest(new TestSuite(InteropDocWrappedTest.class));
143: suite.addTest(new TestSuite(MessagingAttachmentsTest.class));
144: suite.addTest(new TestSuite(SerializationTest.class));
145: suite.addTest(new TestSuite(CharTest.class));
146: suite.addTest(new TestSuite(SOAPENCTest.class));
147: suite.addTest(new TestSuite(MissingInputPartTest.class));
148:
149: if (TestUtilities.areWeTesting("mime"))
150: suite.addTest(new TestSuite(MimeTest.class));
151:
152: if (TestUtilities.areWeTesting("jms")) {
153: suite.addTest(new TestSuite(JmsTest.class));
154: suite.addTest(new TestSuite(JmsFaultTest.class));
155: }
156:
157: return suite;
158: }
159:
160: public static void addIfAvaliable(TestSuite suite, String className) {
161: try {
162: Class klass = Class.forName("ShoppingCartTest");
163: suite.addTest(new TestSuite(klass));
164: } catch (Exception ex) {
165: }
166:
167: }
168: }
|