| 1 |
/* |
| 2 |
* Copyright 2001-2004 The Apache Software Foundation. |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
* you may not use this file except in compliance with the License. |
| 6 |
* You may obtain a copy of the License at |
| 7 |
* |
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
* |
| 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 |
|
| 49 |
Tester.main(args); |
| 50 |
} |
| 51 |
|
| 52 |
/** |
| 53 |
* Method testSwAService |
| 54 |
* |
| 55 |
* @throws Exception |
| 56 |
*/ |
| 57 |
public void testSwAService() throws Exception { |
| 58 |
|
| 59 |
try { |
| 60 |
log.info("Testing SOAP with Attachements sample."); |
| 61 |
doTest(); |
| 62 |
log.info("Test complete."); |
| 63 |
} catch (Exception e) { |
| 64 |
e.printStackTrace(); |
| 65 |
|
| 66 |
throw new Exception("Fault returned from test: " + e); |
| 67 |
} |
| 68 |
} |
| 69 |
} |