1 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 24 26 public class AddressBookTestCase extends TestCase { 27 static Log log = 28 LogFactory.getLog(AddressBookTestCase.class.getName()); 29 30 public AddressBookTestCase(String name) { 31 super(name); 32 } 33 34 public void doTest () throws Exception { 35 String [] args = {}; 36 Main.main(args); 37 } 38 39 public void testAddressBookService () throws Exception { 40 try { 41 log.info("Testing address book sample."); 42 doTest(); 43 log.info("Test complete."); 44 } 45 catch( Exception e ) { 46 e.printStackTrace(); 47 throw new Exception ("Fault returned from test: "+e); 48 } 49 } 50 } 51 52 53 | Popular Tags |