001package org.kuali.ole;
002
003import org.junit.Test;
004
005import java.io.File;
006import java.net.URL;
007
008import static junit.framework.Assert.assertNotNull;
009
010/**
011 * User: peris
012 * Date: 2/7/13
013 * Time: 2:57 PM
014 */
015public class OCLCResponseHandler_UT extends BaseTestCase {
016
017    @Test
018    public void handleOCLCReponse() throws Exception {
019        OCLCResponseHandler oclcResponseHandler = new OCLCResponseHandler();
020        assertNotNull(oclcResponseHandler);
021
022        URL resource = getClass().getResource("oclcresponse.txt");
023        String oclcResponse = readFile(new File(resource.toURI()));
024        System.out.println(oclcResponse);
025        String marcxmlFromOCLCResponse = oclcResponseHandler.getMARCXMLFromOCLCResponse(oclcResponse);
026        assertNotNull(marcxmlFromOCLCResponse);
027        System.out.println(marcxmlFromOCLCResponse);
028    }
029}