Commit 19b28d66 authored by Fischer, Tim's avatar Fischer, Tim

Changed test for SAH and renamed test class

parent 9c1ca179
......@@ -27,10 +27,10 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class XsltTransformerOaiPmhBundlesStreamSourceTest {
public class XSLTTransformerTests {
private final static Logger LOG = LoggerFactory.getLogger(XsltTransformerOaiPmhBundlesStreamSourceTest.class);
private final static Logger LOG = LoggerFactory.getLogger(XSLTTransformerTests.class);
@Test
public void streamBundles() throws IOException, URISyntaxException {
......@@ -1396,7 +1396,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.title") ).count() );
// assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.title.alternative") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.identifier.doi", "https://doi.org/10.18193/sah.v3i1.96") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.country", "IRL") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.country", "MISC") ) );
Set<InputStream> fileSet = bundle.getContents();
assertTrue( fileSet.size() == 1);
......@@ -1484,7 +1484,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.title") ).count() );
// assertEquals(1, metadata.stream().filter(m -> m.getKey().equals("dc.title.alternative") ).count() );
assertTrue( metadata.contains( new SimpleMetadatum("dc.identifier.doi", "https://doi.org/10.18193/sah.v7i1.198") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.country", "IRL") ) );
assertTrue( metadata.contains( new SimpleMetadatum("dc.publisher.country", "MISC") ) );
assertTrue( metadata.contains( new SimpleMetadatum("ssoar.urn.registration", "false") ) );
fileSet = bundle.getContents();
......@@ -2301,13 +2301,7 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
@Test
public void getSinglePublicationFqs() throws IOException {
Map<String, String> map = new HashMap<>();
// String xMetaDissPlusXsltString = IOUtils.toString(
// getClass().
// getClassLoader().
// getResourceAsStream("xslt/fqs-nlm-2-xmlbundle.xslt"), StandardCharsets.UTF_8);
// map.put("nlm", xMetaDissPlusXsltString);
String oaiDcXsltString = IOUtils.toString(
String oaiDcXsltString = IOUtils.toString(
getClass().
getClassLoader().
getResourceAsStream("xslt/fqs-oai_dc-2-xmlbundle_test1.xslt"), StandardCharsets.UTF_8);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment