001 /** 002 * Copyright 2005-2013 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 */ 016 package org.kuali.rice.vc.ken; 017 018 import org.apache.commons.lang.StringUtils; 019 import org.apache.log4j.Logger; 020 import org.junit.Test; 021 import org.kuali.rice.vc.test.WsdlCompareTestCase; 022 023 import java.io.File; 024 import java.util.ArrayList; 025 import java.util.List; 026 027 import static org.junit.Assert.assertTrue; 028 029 public class KenWsdlCompatibilityTest extends WsdlCompareTestCase { 030 private static final Logger LOG = Logger.getLogger(KenWsdlCompatibilityTest.class); 031 private static final String MODULE_NAME = "ken"; 032 033 public KenWsdlCompatibilityTest() { 034 super(MODULE_NAME); 035 } 036 037 @Test 038 public void compareWsdls() { 039 File[] files = new File("../../" + getModuleName() + "/api/target/wsdl").listFiles(); 040 assertTrue("There should be wsdls to compare", files != null && files.length > 0); 041 if (StringUtils.equals("2.0.1", getPreviousVersion()) 042 && files != null) { 043 //hack to remove test for CacheAdminService, because 2.0.1's wdsl for that was generated incorrectly 044 List<File> fileList = new ArrayList<File>(); 045 for (File file : files) { 046 if (!file.getName().equals("SendNotificationService.wsdl")) { 047 fileList.add(file); 048 } 049 } 050 files = fileList.toArray(new File[]{}); 051 } 052 if (files.length > 0) { 053 compareWsdlFiles(files); 054 } 055 } 056 057 058 }