1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.vc.ken;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.apache.log4j.Logger;
20 import org.junit.Test;
21 import org.kuali.rice.vc.test.WsdlCompareTestCase;
22
23 import java.io.File;
24 import java.util.ArrayList;
25 import java.util.List;
26
27 import static org.junit.Assert.assertTrue;
28
29 public class KenWsdlCompatibilityTest extends WsdlCompareTestCase {
30 private static final Logger LOG = Logger.getLogger(KenWsdlCompatibilityTest.class);
31 private static final String MODULE_NAME = "ken";
32
33 public KenWsdlCompatibilityTest() {
34 super(MODULE_NAME);
35 }
36
37 @Test
38 public void compareWsdls() {
39 File[] files = new File("../../" + getModuleName() + "/api/target/wsdl").listFiles();
40 assertTrue("There should be wsdls to compare", files != null && files.length > 0);
41 if (StringUtils.equals("2.0.1", getPreviousVersion())
42 && files != null) {
43
44 List<File> fileList = new ArrayList<File>();
45 for (File file : files) {
46 if (!file.getName().equals("SendNotificationService.wsdl")) {
47 fileList.add(file);
48 }
49 }
50 files = fileList.toArray(new File[]{});
51 }
52 if (files.length > 0) {
53 compareWsdlFiles(files);
54 }
55 }
56
57
58 }