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