1
0
Fork 0

[Bypass Action Set] Fixed test to consider the new identifier utils

This commit is contained in:
Miriam Baglioni 2021-11-15 09:59:23 +01:00
parent 157d33ebf9
commit 6f1a434e90
2 changed files with 10 additions and 10 deletions

View File

@ -93,7 +93,7 @@ public class PrepareTest {
Assertions.assertEquals(86, tmp.count());
String doi1 = "unresolved:10.0000/096020199389707:doi";
String doi1 = "unresolved::10.0000/096020199389707::doi";
Assertions.assertEquals(1, tmp.filter(r -> r.getId().equals(doi1)).count());
Assertions.assertEquals(3, tmp.filter(r -> r.getId().equals(doi1)).collect().get(0).getMeasures().size());
@ -193,7 +193,7 @@ public class PrepareTest {
.textFile(workingDir.toString() + "/work/fos")
.map(item -> OBJECT_MAPPER.readValue(item, Result.class));
String doi1 = "unresolved:10.3390/s18072310:doi";
String doi1 = "unresolved::10.3390/s18072310::doi";
assertEquals(50, tmp.count());
assertEquals(1, tmp.filter(row -> row.getId().equals(doi1)).count());
@ -220,7 +220,7 @@ public class PrepareTest {
.collect()
.contains("nanoscience & nanotechnology"));
String doi = "unresolved:10.1111/1365-2656.12831:doi";
String doi = "unresolved::10.1111/1365-2656.12831::doi";
assertEquals(1, tmp.filter(row -> row.getId().equals(doi)).count());
assertTrue(
tmp

View File

@ -109,12 +109,12 @@ public class ProduceTest {
Assertions.assertEquals(135, tmp.count());
Assertions.assertEquals(1, tmp.filter(row -> row.getId().equals("unresolved:10.3390/s18072310:doi")).count());
Assertions.assertEquals(1, tmp.filter(row -> row.getId().equals("unresolved::10.3390/s18072310::doi")).count());
Assertions
.assertEquals(
3, tmp
.filter(row -> row.getId().equals("unresolved:10.3390/s18072310:doi"))
.filter(row -> row.getId().equals("unresolved::10.3390/s18072310::doi"))
.collect()
.get(0)
.getSubject()
@ -123,14 +123,14 @@ public class ProduceTest {
Assertions
.assertEquals(
3, tmp
.filter(row -> row.getId().equals("unresolved:10.3390/s18072310:doi"))
.filter(row -> row.getId().equals("unresolved::10.3390/s18072310::doi"))
.collect()
.get(0)
.getMeasures()
.size());
List<StructuredProperty> sbjs = tmp
.filter(row -> row.getId().equals("unresolved:10.3390/s18072310:doi"))
.filter(row -> row.getId().equals("unresolved::10.3390/s18072310::doi"))
.flatMap(row -> row.getSubject().iterator())
.collect();
@ -178,7 +178,7 @@ public class ProduceTest {
sbjs.stream().anyMatch(sbj -> sbj.getValue().equals("nanoscience & nanotechnology"));
List<Measure> measures = tmp
.filter(row -> row.getId().equals("unresolved:10.3390/s18072310:doi"))
.filter(row -> row.getId().equals("unresolved::10.3390/s18072310::doi"))
.flatMap(row -> row.getMeasures().iterator())
.collect();
Assertions
@ -217,7 +217,7 @@ public class ProduceTest {
Assertions
.assertEquals(
49, tmp
.filter(row -> !row.getId().equals("unresolved:10.3390/s18072310:doi"))
.filter(row -> !row.getId().equals("unresolved::10.3390/s18072310::doi"))
.filter(row -> row.getSubject() != null)
.count());
@ -225,7 +225,7 @@ public class ProduceTest {
.assertEquals(
85,
tmp
.filter(row -> !row.getId().equals("unresolved:10.3390/s18072310:doi"))
.filter(row -> !row.getId().equals("unresolved::10.3390/s18072310::doi"))
.filter(r -> r.getMeasures() != null)
.count());