001package org.kuali.ole.ingest; 002 003import org.junit.Test; 004import org.kuali.ole.ingest.pojo.Profile; 005 006import java.io.File; 007import java.net.URL; 008 009import static junit.framework.Assert.assertNotNull; 010 011/** 012 * Created by IntelliJ IDEA. 013 * User: pvsubrah 014 * Date: 4/8/12 015 * Time: 9:31 AM 016 * To change this template use File | Settings | File Templates. 017 */ 018public class ProfileObjectGeneratorFromXML_UT { 019 @Test 020 public void testBuildProfileFromFileContent() throws Exception { 021 URL resource = getClass().getResource("ybp-sample-profile.xml"); 022 File file = new File(resource.toURI()); 023 String profileXML = new FileUtil().readFile(file); 024 025 ProfileObjectGeneratorFromXML profileObjectGeneratorFromXML = 026 new ProfileObjectGeneratorFromXML(); 027 028 Profile profile = profileObjectGeneratorFromXML.buildProfileFromFileContent(profileXML); 029 assertNotNull(profile); 030 } 031}