1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.vc.core;
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 CoreWsdlCompatibilityTest extends WsdlCompareTestCase {
31 private static final Logger LOG = Logger.getLogger(CoreWsdlCompatibilityTest.class);
32 private static final String MODULE_NAME = "core";
33
34 public CoreWsdlCompatibilityTest() {
35 super(MODULE_NAME);
36 }
37
38 @Test
39 public void compareCoreServiceWsdls() {
40 File[] files = new File("../../" + getModuleName() + "-service/api/target/wsdl").listFiles();
41 compareWsdlFiles(files);
42 }
43
44 @Test
45 public void compareCoreWsdls() {
46 File[] files = new File("../../" + getModuleName() + "/api/target/wsdl").listFiles();
47 assertTrue("There should be wsdls to compare", files != null && files.length > 0);
48 if (StringUtils.equals("2.0.1", getPreviousVersion())
49 && files != null) {
50
51 List<File> fileList = new ArrayList<File>();
52 for (File file : files) {
53 if (!file.getName().equals("CacheAdminService.wsdl")) {
54 fileList.add(file);
55 }
56 }
57 files = fileList.toArray(new File[]{});
58 }
59 if (files.length > 0) {
60 compareWsdlFiles(files);
61 }
62 }
63
64
65 }