View Javadoc

1   package org.kuali.ole;
2   
3   import org.junit.Ignore;
4   import org.junit.Test;
5   import org.kuali.ole.service.OleValidateInputRequestService;
6   import org.kuali.ole.serviceimpl.OleValidateInputRequestServiceImpl;
7   import org.slf4j.Logger;
8   import org.slf4j.LoggerFactory;
9   import java.util.HashMap;
10  import java.util.Map;
11  
12  import static junit.framework.Assert.assertNotNull;
13  /**
14   * Created with IntelliJ IDEA.
15   * User: ?
16   * Date: 7/19/12
17   * Time: 4:59 PM
18   * To change this template use File | Settings | File Templates.
19   */
20  public class OleValidateInputRequestService_UT  extends BaseTestCase{
21  
22      private static Logger LOG = LoggerFactory.getLogger(OleValidateInputRequestService_UT.class);
23      private OleValidateInputRequestService oleValidateInputRequestService=new OleValidateInputRequestServiceImpl();
24  
25      @Ignore
26      @Test
27      public void testInputRequestValidation() throws Exception{
28  
29          String searchRetireveOperationFlag=oleValidateInputRequestService.inputRequestValidation(getReqParameters());
30          String explainOperationFlag=oleValidateInputRequestService.inputRequestValidation(getReqParameters());
31          assertNotNull(searchRetireveOperationFlag);
32          assertNotNull(explainOperationFlag);
33      }
34  
35      public Map getReqParameters() {
36  
37          HashMap reqParamMap=new HashMap();
38          reqParamMap.put(OleSRUConstants.OPERATION_TYPE,OleSRUConstants.SEARCH_RETRIEVE);
39          reqParamMap.put(OleSRUConstants.VERSION,"1.1");
40          reqParamMap.put(OleSRUConstants.QUERY,"title=jon");
41          reqParamMap.put(OleSRUConstants.START_RECORD,"1");
42          reqParamMap.put(OleSRUConstants.MAXIMUM_RECORDS,"10");
43          reqParamMap.put(OleSRUConstants.RECORD_PACKING,"xml");
44  
45          return reqParamMap;
46  
47      }
48  
49  
50  }