View Javadoc
1   /**
2    * Copyright 2005-2014 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.junit.Test;
21  import org.junit.runner.RunWith;
22  import org.kuali.rice.core.api.lifecycle.Lifecycle;
23  import org.kuali.rice.core.framework.resourceloader.SpringResourceLoader;
24  import org.kuali.rice.kcb.service.GlobalKCBServiceLocator;
25  import org.kuali.rice.kcb.service.KCBServiceLocator;
26  import org.kuali.rice.test.BaselineTestCase;
27  import org.kuali.rice.test.runners.BootstrapTest;
28  import org.kuali.rice.test.runners.LoadTimeWeavableTestRunner;
29  
30  /**
31   * Base KCBTestCase
32   *
33   * @author Kuali Rice Team (rice.collab@kuali.org)
34   */
35  @BaselineTestCase.BaselineMode(BaselineTestCase.Mode.ROLLBACK_CLEAR_DB)
36  @RunWith(LoadTimeWeavableTestRunner.class)
37  @BootstrapTest(KCBTestCase.BootstrapTest.class)
38  public abstract class KCBTestCase extends BaselineTestCase {
39      protected KCBServiceLocator services;
40  
41      public KCBTestCase() {
42          super("kcb");
43      }
44  
45      @Override
46      public void setUp() throws Exception {
47          super.setUp();
48          services = GlobalKCBServiceLocator.getInstance();
49      }
50  
51      @Override
52      protected Lifecycle getLoadApplicationLifecycle() {
53          SpringResourceLoader springResourceLoader = new SpringResourceLoader(new QName("KCBTestHarnessApplicationResourceLoader"), "classpath:KCBTestHarnessSpringBeans.xml", null);
54          springResourceLoader.setParentSpringResourceLoader(getTestHarnessSpringResourceLoader());
55          return springResourceLoader;
56      }
57  
58      public static final class BootstrapTest extends KCBTestCase {
59          @Test
60          public void bootstrapTest() {};
61      }
62  
63  }