01: /*
02: * Copyright 2001-2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package samples.swa;
17:
18: import junit.framework.TestCase;
19: import org.apache.axis.components.logger.LogFactory;
20: import org.apache.commons.logging.Log;
21:
22: /**
23: * Test the SwA sample code.
24: */
25: public class SwaTestCase extends TestCase {
26:
27: /** Field log */
28: static Log log = LogFactory.getLog(SwaTestCase.class.getName());
29:
30: /**
31: * Constructor SwaTestCase
32: *
33: * @param name
34: */
35: public SwaTestCase(String name) {
36: super (name);
37: }
38:
39: /**
40: * Method doTest
41: *
42: * @throws Exception
43: */
44: public void doTest() throws Exception {
45:
46: String[] args = {};
47:
48: Tester.main(args);
49: }
50:
51: /**
52: * Method testSwAService
53: *
54: * @throws Exception
55: */
56: public void testSwAService() throws Exception {
57:
58: try {
59: log.info("Testing SOAP with Attachements sample.");
60: doTest();
61: log.info("Test complete.");
62: } catch (Exception e) {
63: e.printStackTrace();
64:
65: throw new Exception("Fault returned from test: " + e);
66: }
67: }
68: }
|