001/** 002 * Copyright 2005-2014 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.vc.kew; 017 018import org.apache.log4j.Logger; 019import org.junit.Test; 020import org.kuali.rice.vc.test.WsdlCompareTestCase; 021 022import java.io.File; 023import java.util.Arrays; 024import java.util.Collections; 025import java.util.HashMap; 026import java.util.List; 027import java.util.Map; 028 029public class KewWsdlCompatibilityTest extends WsdlCompareTestCase { 030 private static final Logger LOG = Logger.getLogger(KewWsdlCompatibilityTest.class); 031 private static final String MODULE_NAME = "kew"; 032 033 public KewWsdlCompatibilityTest() { 034 super(MODULE_NAME); 035 } 036 037 @Test 038 public void compareKewApiWsdls() { 039 String wsdlDirectory = "../../" + getModuleName() + "/api/target/wsdl"; 040 File[] files = new File(wsdlDirectory).listFiles(); 041 if (files == null) throw new RuntimeException("can't find wsdls at " + wsdlDirectory + " from " + (new File(".")).getAbsolutePath()); 042 compareWsdlFiles(files); 043 } 044 045 046 @Test 047 public void compareKewFrameworkWsdls() { 048 String wsdlDirectory = "../../" + getModuleName() + "/framework/target/wsdl"; 049 File[] files = new File(wsdlDirectory).listFiles(); 050 if (files == null) throw new RuntimeException("can't find wsdls at " + wsdlDirectory + " from " + (new File(".")).getAbsolutePath()); 051 compareWsdlFiles(files); 052 } 053 054 @Override 055 protected Map<String, List<WsdlCompareTestCase.VersionTransition>> getWsdlVersionTransitionBlacklists() { 056 Map<String, List<WsdlCompareTestCase.VersionTransition>> blacklist = 057 new HashMap<String, List<WsdlCompareTestCase.VersionTransition>>(super.getWsdlVersionTransitionBlacklists()); 058 059 blacklist.put("ImmediateEmailReminderQueue", 060 Arrays.asList( 061 new WsdlCompareTestCase.VersionTransition("2.1.0", "2.1.1"), 062 new WsdlCompareTestCase.VersionTransition("2.0.2", "2.1.1") 063 )); 064 065 blacklist.put("ActionListService", 066 Arrays.asList( 067 new WsdlCompareTestCase.VersionTransition("2.1.0", "2.1.1"), 068 new WsdlCompareTestCase.VersionTransition("2.0.2", "2.1.1") 069 )); 070 071 blacklist.put("WorkflowDocumentService", 072 Arrays.asList( 073 new WsdlCompareTestCase.VersionTransition("2.1.2", "2.2.0"), 074 new WsdlCompareTestCase.VersionTransition("2.2.0", "2.2.1") 075 )); 076 077 return blacklist; 078 } 079}