View Javadoc
1   /**
2    * Copyright 2005-2014 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.Collections;
25  import java.util.HashMap;
26  import java.util.List;
27  import java.util.Map;
28  
29  public class KewWsdlCompatibilityTest extends WsdlCompareTestCase {
30      private static final Logger LOG = Logger.getLogger(KewWsdlCompatibilityTest.class);
31      private static final String MODULE_NAME = "kew";
32  
33      public KewWsdlCompatibilityTest() {
34          super(MODULE_NAME);
35      }
36  
37      @Test
38      public void compareKewApiWsdls() {
39          String wsdlDirectory = "../../" + getModuleName() + "/api/target/wsdl";
40          File[] files = new File(wsdlDirectory).listFiles();
41          if (files == null) throw new RuntimeException("can't find wsdls at " + wsdlDirectory + " from " + (new File(".")).getAbsolutePath());
42          compareWsdlFiles(files);
43      }
44  
45  
46      @Test
47      public void compareKewFrameworkWsdls() {
48          String wsdlDirectory = "../../" + getModuleName() + "/framework/target/wsdl";
49          File[] files = new File(wsdlDirectory).listFiles();
50          if (files == null) throw new RuntimeException("can't find wsdls at " + wsdlDirectory + " from " + (new File(".")).getAbsolutePath());
51          compareWsdlFiles(files);
52      }
53  
54      @Override
55      protected Map<String, List<WsdlCompareTestCase.VersionTransition>> getWsdlVersionTransitionBlacklists() {
56          Map<String, List<WsdlCompareTestCase.VersionTransition>> blacklist =
57                  new HashMap<String, List<WsdlCompareTestCase.VersionTransition>>(super.getWsdlVersionTransitionBlacklists());
58  
59          blacklist.put("ImmediateEmailReminderQueue",
60                  Arrays.asList(
61                          new WsdlCompareTestCase.VersionTransition("2.1.0", "2.1.1"),
62                          new WsdlCompareTestCase.VersionTransition("2.0.2", "2.1.1")
63                  ));
64  
65          blacklist.put("ActionListService",
66                  Arrays.asList(
67                          new WsdlCompareTestCase.VersionTransition("2.1.0", "2.1.1"),
68                          new WsdlCompareTestCase.VersionTransition("2.0.2", "2.1.1")
69                  ));
70  
71          blacklist.put("WorkflowDocumentService",
72                  Arrays.asList(
73                          new WsdlCompareTestCase.VersionTransition("2.1.2", "2.2.0"),
74                          new WsdlCompareTestCase.VersionTransition("2.2.0", "2.2.1")
75                  ));
76  
77          return blacklist;
78      }
79  }