1   package org.kuali.ole.web;
2   
3   import org.junit.After;
4   import org.junit.Before;
5   import org.junit.Test;
6   import org.kuali.ole.docstore.discovery.servlet.DocumentConfigServlet;
7   import org.kuali.ole.docstore.discovery.web.struts.action.DiscoveryAction;
8   import org.springframework.mock.web.MockHttpServletRequest;
9   import org.springframework.mock.web.MockHttpServletResponse;
10  
11  import javax.servlet.ServletException;
12  import java.io.*;
13  import java.net.URL;
14  
15  
16  
17  
18  
19  
20  
21  
22  public class DocumentConfigServlet_UT {
23      private MockHttpServletRequest  mockRequest  = new MockHttpServletRequest();
24      private MockHttpServletResponse mockResponse = new MockHttpServletResponse();
25      DocumentConfigServlet documentConfigServlet = new DocumentConfigServlet();
26  
27      
28  
29  
30  
31  
32      @Before
33      public void setUp() throws Exception {
34      }
35  
36      
37  
38  
39  
40  
41      @After
42      public void tearDown() throws Exception {
43      }
44  
45      @Test
46      public void testDocumentConfig() throws Exception {
47          URL resource = getClass().getResource("/DocumentConfig.xml");
48          File file = new File(resource.toURI());
49          System.setProperty("document.config.file", file.getPath());
50          documentConfigServlet.doGet(mockRequest, mockResponse);
51      }
52  }