001package org.kuali.ole.ingest.krms.builder;
002
003import org.junit.Test;
004import org.kuali.ole.ingest.FileUtil;
005import org.kuali.ole.ingest.krms.pojo.OleKrms;
006
007import java.io.File;
008import java.net.URL;
009
010import static junit.framework.Assert.assertNotNull;
011
012/**
013 * Created with IntelliJ IDEA.
014 * User: vivekb
015 * Date: 7/2/12
016 * Time: 11:21 AM
017 * To change this template use File | Settings | File Templates.
018 */
019public class OleKrmsObjectGeneratorFromXML_UT {
020    @Test
021    public void testBuildKrmsFromFileContentForLoan() throws Exception {
022        URL resource = getClass().getResource("deliver.xml");
023        File file = new File(resource.toURI());
024        String krmsXML = new FileUtil().readFile(file);
025
026       OleKrmsObjectGeneratorFromXML krmsObjectGeneratorFromXML =
027                new OleKrmsObjectGeneratorFromXML();
028
029        OleKrms krms = krmsObjectGeneratorFromXML.buildKrmsFromFileContent(krmsXML);
030        assertNotNull(krms);
031
032    }
033}