1 package org.kuali.ole;
2
3 import org.junit.Test;
4 import org.junit.runner.RunWith;
5 import org.kuali.ole.docstore.common.constants.DocstoreConstants;
6 import org.kuali.ole.docstore.discovery.service.SolrServerManager;
7 import org.kuali.ole.docstore.discovery.util.DiscoveryEnvUtil;
8 import org.slf4j.Logger;
9 import org.slf4j.LoggerFactory;
10 import org.springframework.beans.factory.annotation.Autowired;
11 import org.springframework.context.ApplicationContext;
12 import org.springframework.test.context.ContextConfiguration;
13 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
14 import org.springframework.transaction.annotation.Transactional;
15
16 import java.io.File;
17
18 import static junit.framework.TestCase.assertNotNull;
19
20
21
22
23
24
25
26
27 @RunWith(SpringJUnit4ClassRunner.class)
28 @ContextConfiguration("classpath:org/kuali/ole/BootStrapSpringBeans.xml")
29
30 public class SpringBaseTestCase implements DocstoreConstants {
31
32 protected final Logger LOG = LoggerFactory.getLogger(this.getClass());
33 protected String classesDir;
34 protected String solrHome;
35 protected DiscoveryEnvUtil discoveryEnvUtil = new DiscoveryEnvUtil();
36
37
38 public SpringBaseTestCase() {
39 classesDir = getClass().getResource("/").getPath();
40
41 discoveryEnvUtil.initTestEnvironment();
42 discoveryEnvUtil.printEnvironment();
43
44 }
45 @Autowired
46 private ApplicationContext context;
47
48 protected ApplicationContext getContext() {
49 return context;
50 }
51
52 @Test
53 public void applicationContextNotNull() throws Exception {
54 assertNotNull(context);
55 }
56 }