View Javadoc
1   package org.kuali.ole.ingest.krms.builder;
2   
3   import org.junit.Test;
4   import org.kuali.ole.ingest.FileUtil;
5   import org.kuali.ole.ingest.krms.pojo.OleKrms;
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 OleKrmsObjectGeneratorFromXML_UT {
20      @Test
21      public void testBuildKrmsFromFileContentForLoan() throws Exception {
22          URL resource = getClass().getResource("deliver.xml");
23          File file = new File(resource.toURI());
24          String krmsXML = new FileUtil().readFile(file);
25  
26         OleKrmsObjectGeneratorFromXML krmsObjectGeneratorFromXML =
27                  new OleKrmsObjectGeneratorFromXML();
28  
29          OleKrms krms = krmsObjectGeneratorFromXML.buildKrmsFromFileContent(krmsXML);
30          assertNotNull(krms);
31  
32      }
33  }