package eu.dnetlib.ariadneplus.rdf; import eu.dnetlib.ariadneplus.publisher.SaxonHelper; import net.sf.saxon.s9api.SaxonApiException; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import static org.junit.Assert.assertEquals; /** * Created by Alessia Bardi on 15/03/2018. * * @author Alessia Bardi */ @RunWith(JUnit4.class) public class RecordParserHelperTest { private String testRecord = "
http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/Eleni%20Vernardakiapi_________::ariadneplus___::ariadneplus::topLevelARIADNEPLUS
\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "
"; private RecordParserHelper help; private SaxonHelper saxonHelper; @Before public void setup() throws SaxonApiException { saxonHelper = new SaxonHelper(); help = new RecordParserHelper(); help.setSaxonHelper(saxonHelper); help.init(); } @Test public void testGetObjId(){ assertEquals("http://ariadneplus.d4science.org/handle/AriadnePlus/REG/Actor/Eleni%20Vernardaki", help.getObjIdentifier(testRecord)); } }