View Javadoc

1   /**
2    * Copyright 2005-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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 org.kuali.rice.vc.kew;
17  
18  import org.apache.log4j.Logger;
19  import org.junit.Test;
20  import org.kuali.rice.vc.test.WsdlCompareTestCase;
21  
22  import java.io.File;
23  import java.util.Arrays;
24  import java.util.HashMap;
25  import java.util.List;
26  import java.util.Map;
27  
28  public class KewWsdlCompatibilityTest extends WsdlCompareTestCase {
29      private static final Logger LOG = Logger.getLogger(KewWsdlCompatibilityTest.class);
30      private static final String MODULE_NAME = "kew";
31  
32      public KewWsdlCompatibilityTest() {
33          super(MODULE_NAME);
34      }
35  
36      @Test
37      public void compareKewApiWsdls() {
38          String wsdlDirectory = "../../" + getModuleName() + "/api/target/wsdl";
39          File[] files = new File(wsdlDirectory).listFiles();
40          if (files == null) throw new RuntimeException("can't find wsdls at " + wsdlDirectory + " from " + (new File(".")).getAbsolutePath());
41          compareWsdlFiles(files);
42      }
43  
44  
45      @Test
46      public void compareKewFrameworkWsdls() {
47          String wsdlDirectory = "../../" + getModuleName() + "/framework/target/wsdl";
48          File[] files = new File(wsdlDirectory).listFiles();
49          if (files == null) throw new RuntimeException("can't find wsdls at " + wsdlDirectory + " from " + (new File(".")).getAbsolutePath());
50          compareWsdlFiles(files);
51      }
52  
53      @Override
54      protected Map<String, List<WsdlCompareTestCase.VersionTransition>> getWsdlVersionTransitionBlacklists() {
55          Map<String, List<WsdlCompareTestCase.VersionTransition>> blacklist =
56                  new HashMap<String, List<WsdlCompareTestCase.VersionTransition>>(super.getWsdlVersionTransitionBlacklists());
57  
58          blacklist.put("ImmediateEmailReminderQueue",
59                  Arrays.asList(
60                          new WsdlCompareTestCase.VersionTransition("2.1.0", "2.1.1"),
61                          new WsdlCompareTestCase.VersionTransition("2.0.2", "2.1.1")
62                  ));
63  
64          blacklist.put("ActionListService",
65                  Arrays.asList(
66                          new WsdlCompareTestCase.VersionTransition("2.1.0", "2.1.1"),
67                          new WsdlCompareTestCase.VersionTransition("2.0.2", "2.1.1")
68                  ));
69  
70          blacklist.put("WorkflowDocumentService",
71                  Arrays.asList(
72                          new WsdlCompareTestCase.VersionTransition("2.2.0", "2.2.1")
73                  ));
74  
75          return blacklist;
76      }
77  }