From 426b76ee8eb70265dd3103d7da48d6b774606b61 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Wed, 9 Dec 2020 19:46:11 +0100 Subject: [PATCH] more asserts for TextGrid record --- .../eu/dnetlib/dhp/oa/graph/raw/MappersTest.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java index 46cb1a535..737a255e8 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java +++ b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java @@ -355,7 +355,20 @@ public class MappersTest { assertValidId(p.getId()); assertValidId(p.getCollectedfrom().get(0).getKey()); assertTrue(StringUtils.isNotBlank(p.getTitle().get(0).getValue())); - System.out.println(p.getTitle().get(0).getValue()); + assertEquals(1, p.getAuthor().size()); + assertEquals("OPEN", p.getBestaccessright().getClassid()); + assertTrue(StringUtils.isNotBlank(p.getPid().get(0).getValue())); + assertTrue(StringUtils.isNotBlank(p.getPid().get(0).getQualifier().getClassid())); + assertEquals("dataset", p.getResulttype().getClassname()); + assertEquals(1, p.getInstance().size()); + assertEquals("OPEN", p.getInstance().get(0).getAccessright().getClassid()); + assertValidId(p.getInstance().get(0).getCollectedfrom().getKey()); + assertValidId(p.getInstance().get(0).getHostedby().getKey()); + assertEquals("http://creativecommons.org/licenses/by/3.0/de/legalcode", p.getInstance().get(0).getLicense().getValue()); + assertEquals(1, p.getInstance().get(0).getUrl().size()); +// System.out.println(p.getInstance().get(0).getUrl().get(0)); +// System.out.println(p.getInstance().get(0).getHostedby().getValue()); + System.out.println(p.getPid().get(0).getValue()); } @Test