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
14
15
16
17
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 }