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.kns;
17  
18  import org.junit.Test;
19  import org.junit.runner.RunWith;
20  import org.kuali.rice.core.api.lifecycle.Lifecycle;
21  import org.kuali.rice.core.framework.resourceloader.SpringResourceLoader;
22  import org.kuali.rice.krad.test.KRADTestCase;
23  import org.kuali.rice.test.BaselineTestCase;
24  import org.kuali.rice.test.runners.BootstrapTest;
25  import org.kuali.rice.test.runners.LoadTimeWeavableTestRunner;
26  
27  import javax.xml.namespace.QName;
28  import java.util.ArrayList;
29  import java.util.List;
30  
31  /**
32   * Test base class for legacy KNS Tests
33   *
34   * @author Kuali Rice Team (rice.collab@kuali.org)
35   *
36   * @deprecated KNS test class, convert to KRAD equivalent if applicable.
37   */
38  @Deprecated
39  @BaselineTestCase.BaselineMode(BaselineTestCase.Mode.ROLLBACK_CLEAR_DB)
40  @RunWith(LoadTimeWeavableTestRunner.class)
41  @BootstrapTest(KNSTestCase.BootstrapTest.class)
42  public class KNSTestCase extends KRADTestCase {
43  
44      @Override
45      protected Lifecycle getLoadApplicationLifecycle() {
46          List<String> resourceLocations = new ArrayList<String>();
47          resourceLocations.add("classpath:KRADTestHarnessSpringBeans.xml");
48          resourceLocations.add("classpath:KNSTestSpringBeans.xml");
49  
50          SpringResourceLoader springResourceLoader = new SpringResourceLoader(new QName("KRADTestResourceLoader"),
51                  resourceLocations, null);
52          springResourceLoader.setParentSpringResourceLoader(getTestHarnessSpringResourceLoader());
53  
54          return springResourceLoader;
55      }
56  
57      public static final class BootstrapTest extends KNSTestCase {
58          @Test
59          public void bootstrapTest() {};
60      }
61  }