KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > wsdl > selectivefilegen > CmdLineExcludeTestCase


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 test.wsdl.selectivefilegen;
17
18 import java.io.File JavaDoc;
19 import java.util.HashSet JavaDoc;
20 import java.util.Set JavaDoc;
21
22 import test.wsdl.filegen.FileGenTestCase;
23
24 /**
25  * This test verifies that the selective file generation exclude option
26  * works with the cmd line interface where the other tests concentrated on the
27  * Ant task interface. This test will exclude one of the Bean classes and have
28  * the service(s) map to a custom bean.
29  
30     @author Jim Stafford jim.stafford@raba.com
31 */

32 public class CmdLineExcludeTestCase extends FileGenTestCase {
33
34     /**
35      * List of files which should be generated.
36      */

37     protected Set JavaDoc shouldExist() {
38         HashSet JavaDoc set = new HashSet JavaDoc();
39         String JavaDoc bean1Dir = "bean1";
40         String JavaDoc bean2Dir = "bean2";
41         String JavaDoc servicesDir = "services";
42         
43         //excluded - set.add(bean1Dir + File.separator + "Bean1.java");
44
set.add(bean2Dir + File.separator + "Bean2.java");
45         set.add(servicesDir + File.separator + "Reporter.java");
46         set.add(servicesDir + File.separator + "ReporterSoapBindingImpl.java");
47         set.add(servicesDir + File.separator + "ReporterSoapBindingStub.java");
48         set.add(servicesDir + File.separator + "ReporterSoapBindingSkeleton.java");
49         set.add(servicesDir + File.separator + "deploy.wsdd");
50         set.add(servicesDir + File.separator + "undeploy.wsdd");
51         return set;
52     }
53
54     protected String JavaDoc rootDir() {
55         return "build" + File.separator + "work" + File.separator +
56                 "test" + File.separator + "wsdl" + File.separator +
57                 "selectivefilegen" + File.separator +
58                 "cmdlinex";
59     }
60
61     public CmdLineExcludeTestCase(String JavaDoc name) {
62         super(name);
63     }
64 }
65
Popular Tags