View Javadoc

1   /**
2    * Copyright 2005-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  package org.kuali.rice.kcb.test;
17  
18  import javax.xml.namespace.QName;
19  
20  import org.kuali.rice.core.api.lifecycle.Lifecycle;
21  import org.kuali.rice.core.framework.resourceloader.SpringResourceLoader;
22  import org.kuali.rice.kcb.service.GlobalKCBServiceLocator;
23  import org.kuali.rice.kcb.service.KCBServiceLocator;
24  import org.kuali.rice.test.BaselineTestCase;
25  
26  /**
27   * Base KCBTestCase 
28   * 
29   * @author Kuali Rice Team (rice.collab@kuali.org)
30   */
31  public abstract class KCBTestCase extends BaselineTestCase {
32      protected KCBServiceLocator services;
33  
34      public KCBTestCase() {
35          super("kcb");
36      }
37  
38      @Override
39      public void setUp() throws Exception {
40          super.setUp();
41          services = GlobalKCBServiceLocator.getInstance();
42      }
43      
44      @Override
45  	protected Lifecycle getLoadApplicationLifecycle() {
46      	SpringResourceLoader springResourceLoader = new SpringResourceLoader(new QName("KCBTestHarnessApplicationResourceLoader"), "classpath:KCBTestHarnessSpringBeans.xml", null);
47      	springResourceLoader.setParentSpringResourceLoader(getTestHarnessSpringResourceLoader());
48      	return springResourceLoader;
49  	}
50  
51  }