1   package org.kuali.ole.ingest;
2   
3   import org.junit.Test;
4   import org.kuali.ole.ingest.pojo.Profile;
5   
6   import java.io.File;
7   import java.net.URL;
8   
9   import static junit.framework.Assert.assertNotNull;
10  
11  
12  
13  
14  
15  
16  
17  
18  public class ProfileObjectGeneratorFromXML_UT {
19      @Test
20      public void testBuildProfileFromFileContent() throws Exception {
21          URL resource = getClass().getResource("ybp-sample-profile.xml");
22          File file = new File(resource.toURI());
23          String profileXML = new FileUtil().readFile(file);
24  
25          ProfileObjectGeneratorFromXML profileObjectGeneratorFromXML =
26                  new ProfileObjectGeneratorFromXML();
27  
28          Profile profile = profileObjectGeneratorFromXML.buildProfileFromFileContent(profileXML);
29          assertNotNull(profile);
30      }
31  }