View Javadoc
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   * Created by IntelliJ IDEA.
13   * User: pvsubrah
14   * Date: 4/8/12
15   * Time: 9:31 AM
16   * To change this template use File | Settings | File Templates.
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  }