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:
17: package samples.addr;
18:
19: import junit.framework.TestCase;
20: import org.apache.axis.components.logger.LogFactory;
21: import org.apache.commons.logging.Log;
22:
23: /** Test the address book sample code.
24: */
25: public class AddressBookTestCase extends TestCase {
26: static Log log = LogFactory.getLog(AddressBookTestCase.class
27: .getName());
28:
29: public AddressBookTestCase(String name) {
30: super (name);
31: }
32:
33: public void doTest() throws Exception {
34: String[] args = {};
35: Main.main(args);
36: }
37:
38: public void testAddressBookService() throws Exception {
39: try {
40: log.info("Testing address book sample.");
41: doTest();
42: log.info("Test complete.");
43: } catch (Exception e) {
44: e.printStackTrace();
45: throw new Exception("Fault returned from test: " + e);
46: }
47: }
48: }
|