Clover Coverage Report - Kuali Student 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 05:03:32 EDT
../../../../img/srcFileCovDistChart0.png 2% of files have more coverage
9   57   6   2.25
4   26   0.67   4
4     1.5  
1    
 
  RiceInternalSuiteDataTestCase       Line # 29 9 0% 6 17 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2007-2009 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10    * Unless required by applicable law or agreed to in writing, software
11    * distributed under the License is distributed on an "AS IS" BASIS,
12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    * See the License for the specific language governing permissions and
14    * limitations under the License.
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    * A TestCase superclass to be used internally by Rice for tests that need to
25    * load all of the Rice suite-level test data.
26    *
27    * @author Kuali Rice Team (rice.collab@kuali.org)
28    */
 
29    public abstract class RiceInternalSuiteDataTestCase extends RiceTestCase {
30   
31    /**
32    * Loads the suite test data from the shared DefaultSuiteTestData.sql
33    */
 
34  0 toggle @Override
35    protected void loadSuiteTestData() throws Exception {
36  0 new SQLDataLoader(getKNSDefaultSuiteTestData(), "/").runSql();
37  0 BufferedReader reader = new BufferedReader(new FileReader(getKIMDataLoadOrderFile()));
38  0 String line = null;
39  0 while ((line = reader.readLine()) != null) {
40  0 if (!StringUtils.isBlank(line)) {
41  0 new SQLDataLoader(getKIMSqlFileBaseLocation() + "/" + line, "/").runSql();
42    }
43    }
44    }
45   
 
46  0 toggle protected String getKNSDefaultSuiteTestData() {
47  0 return "file:" + getBaseDir() + "/../impl/src/test/config/data/DefaultSuiteTestDataKNS.sql";
48    }
49   
 
50  0 toggle protected String getKIMDataLoadOrderFile() {
51  0 return getBaseDir() + "/../impl/src/test/config/data/KIMDataLoadOrder.txt";
52    }
53   
 
54  0 toggle protected String getKIMSqlFileBaseLocation() {
55  0 return "file:" + getBaseDir() + "/../impl/src/test/config/data";
56    }
57    }