View Javadoc

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