View Javadoc
1   package org.kuali.ole.ingest;
2   
3   import org.junit.Test;
4   import org.kuali.ole.ingest.pojo.OleLocationGroup;
5   
6   import java.io.File;
7   import java.net.URL;
8   
9   import static junit.framework.Assert.assertNotNull;
10  
11  
12  public class OleLocationObjectGeneratorFromXML_UT {
13      @Test
14      public void testBuildLocationFromFileContent() throws Exception {
15          URL resource = getClass().getResource("DefaultLibraryLocations.xml");
16          File file = new File(resource.toURI());
17          String locationXML = new FileUtil().readFile(file);
18          OleLocationObjectGeneratorFromXML oleLocationObjectGeneratorFromXML =
19                  new OleLocationObjectGeneratorFromXML();
20  
21          OleLocationGroup location = oleLocationObjectGeneratorFromXML.buildLocationFromFileContent(locationXML);
22          assertNotNull(location);
23      }
24  }