View Javadoc

1   package org.kuali.ole.patron.merge.controller;
2   
3   import org.junit.Test;
4   import org.kuali.ole.ingest.FileUtil;
5   import org.kuali.ole.patron.merge.bo.OlePatronConfig;
6   
7   import java.io.File;
8   import java.net.URL;
9   
10  import static junit.framework.Assert.assertNotNull;
11  
12  /**
13   * Created with IntelliJ IDEA.
14   * User: vivekb
15   * Date: 7/2/12
16   * Time: 11:21 AM
17   * To change this template use File | Settings | File Templates.
18   */
19  public class OlePatronConfigObjectGeneratorFromXML_UT {
20      @Test
21      public void testBuildKrmsFromFileContentForLoan() throws Exception {
22          URL resource = getClass().getResource("patronConfig.xml");
23          File file = new File(resource.toURI());
24          String patronConfigXML = new FileUtil().readFile(file);
25  
26         OlePatronConfigObjectGeneratorFromXML patronConfigObjectGeneratorFromXML =
27                  new OlePatronConfigObjectGeneratorFromXML();
28  
29          OlePatronConfig patronConfig = patronConfigObjectGeneratorFromXML.buildKrmsFromFileContent(patronConfigXML);
30          assertNotNull(patronConfig);
31  
32      }
33  }