KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > deployment > SystemPhasesremovedTest


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

24
25 /**
26  * Author : Deepal Jayasinghe
27  * Date: May 14, 2005
28  * Time: 3:30:53 PM
29  */

30 public class SystemPhasesremovedTest extends TestCase{
31
32     AxisConfiguration er;
33
34         public void testPhaseOrderchage() {
35             try {
36                 String JavaDoc filename = "./test-resources/deployment/SystemPhaseRemove";
37                 ConfigurationContextFactory builder = new ConfigurationContextFactory();
38                 er = builder.buildConfigurationContext(filename).getAxisConfiguration();
39                 fail("this must failed gracefully with DeploymentException \"Invalid System predefined " +
40                         "inphases , phase order dose not\" +\n support\\n recheck axis2.xml\"");
41             } catch (DeploymentException e) {
42                 e.printStackTrace();
43             }
44         }
45
46 }
47
Popular Tags