Clover Coverage Report - kns-test 2.0.0-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../../../img/srcFileCovDistChart0.png 0% of files have more coverage
9   66   4   2.25
0   36   0.44   4
4     1  
1    
 
  KNSTestCase       Line # 37 9 0% 4 13 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2006-2011 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   
17    package org.kuali.test;
18   
19    import org.kuali.rice.core.api.lifecycle.Lifecycle;
20    import org.kuali.rice.core.api.lifecycle.Lifecycle;
21    import org.kuali.rice.core.impl.resourceloader.SpringResourceLoader;
22    import org.kuali.rice.core.impl.resourceloader.SpringResourceLoader;
23    import org.kuali.rice.test.BaselineTestCase;
24    import org.kuali.rice.test.SQLDataLoader;
25    import org.kuali.rice.test.lifecycles.KEWXmlDataLoaderLifecycle;
26   
27    import javax.xml.namespace.QName;
28    import java.util.List;
29   
30   
31    /**
32    * Default test base for a full KNS enabled unit test.
33    *
34    * @author Kuali Rice Team (rice.collab@kuali.org)
35    */
36    @BaselineTestCase.BaselineMode(BaselineTestCase.Mode.ROLLBACK_CLEAR_DB)
 
37    public abstract class KNSTestCase extends BaselineTestCase {
38   
39    private static final String SQL_FILE = "classpath:org/kuali/rice/kns/test/DefaultSuiteTestData.sql";
40    private static final String XML_FILE = "classpath:org/kuali/rice/kns/test/DefaultSuiteTestData.xml";
41    private static final String KNS_MODULE_NAME = "kns";
42   
 
43  0 toggle public KNSTestCase() {
44  0 super(KNS_MODULE_NAME);
45    }
46   
 
47  0 toggle @Override
48    protected List<Lifecycle> getSuiteLifecycles() {
49  0 List<Lifecycle> suiteLifecycles = super.getSuiteLifecycles();
50  0 suiteLifecycles.add(new KEWXmlDataLoaderLifecycle(XML_FILE));
51  0 return suiteLifecycles;
52    }
53   
 
54  0 toggle @Override
55    protected void loadSuiteTestData() throws Exception {
56  0 super.loadSuiteTestData();
57  0 new SQLDataLoader(SQL_FILE, ";").runSql();
58    }
59   
 
60  0 toggle @Override
61    protected Lifecycle getLoadApplicationLifecycle() {
62  0 SpringResourceLoader springResourceLoader = new SpringResourceLoader(new QName("KNSTestResourceLoader"), "classpath:KnsTestSpringBeans.xml", null);
63  0 springResourceLoader.setParentSpringResourceLoader(getTestHarnessSpringResourceLoader());
64  0 return springResourceLoader;
65    }
66    }