1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.test;
17
18 import java.io.BufferedReader;
19 import java.io.FileReader;
20
21 import org.apache.commons.lang.StringUtils;
22
23
24
25
26
27
28
29 public abstract class RiceInternalSuiteDataTestCase extends RiceTestCase {
30
31
32
33
34 @Override
35 protected void loadSuiteTestData() throws Exception {
36 new SQLDataLoader(getKNSDefaultSuiteTestData(), "/").runSql();
37 BufferedReader reader = new BufferedReader(new FileReader(getKIMDataLoadOrderFile()));
38 String line = null;
39 while ((line = reader.readLine()) != null) {
40 if (!StringUtils.isBlank(line)) {
41 new SQLDataLoader(getKIMSqlFileBaseLocation() + "/" + line, "/").runSql();
42 }
43 }
44 }
45
46 protected String getKNSDefaultSuiteTestData() {
47 return "file:" + getBaseDir() + "/../impl/src/test/config/data/DefaultSuiteTestDataKNS.sql";
48 }
49
50 protected String getKIMDataLoadOrderFile() {
51 return getBaseDir() + "/../impl/src/test/config/data/KIMDataLoadOrder.txt";
52 }
53
54 protected String getKIMSqlFileBaseLocation() {
55 return "file:" + getBaseDir() + "/../impl/src/test/config/data";
56 }
57 }