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