KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > handlers > addressing > AddressingModuleTest


1 package org.apache.axis2.handlers.addressing;
2
3 import junit.framework.TestCase;
4 import org.apache.axis2.context.ConfigurationContextFactory;
5 import org.apache.axis2.description.ModuleDescription;
6 import org.apache.axis2.engine.AxisConfiguration;
7 import org.apache.axis2.engine.AxisFault;
8
9 import javax.xml.namespace.QName JavaDoc;
10 import java.io.File JavaDoc;
11
12 /**
13  * Copyright 2001-2004 The Apache Software Foundation.
14  * <p/>
15  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
16  * use this file except in compliance with the License. You may obtain a copy of
17  * the License at
18  * <p/>
19  * http://www.apache.org/licenses/LICENSE-2.0
20  * <p/>
21  * Unless required by applicable law or agreed to in writing, software
22  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
23  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
24  * License for the specific language governing permissions and limitations under
25  * the License.
26  * <p/>
27  */

28 public class AddressingModuleTest extends TestCase {
29
30     /**
31      * @param testName
32      */

33     public AddressingModuleTest(String JavaDoc testName) {
34         super(testName);
35     }
36
37     public void testExtractAddressingInformationFromHeaders() throws AxisFault {
38             ConfigurationContextFactory builder = new ConfigurationContextFactory();
39             AxisConfiguration er = builder.buildConfigurationContext("target").getAxisConfiguration();
40             File JavaDoc file = new File JavaDoc("target/addressing.mar");
41             assertTrue(file.exists());
42             ModuleDescription moduleDesc = er.getModule(new QName JavaDoc("addressing"));
43             assertNotNull(moduleDesc);
44     }
45
46 }
47
Popular Tags