forked from D-Net/dnet-hadoop
[Bypass Action Set] Fixed test to consider the new identifier utils
This commit is contained in:
parent
157d33ebf9
commit
6f1a434e90
|
@ -93,7 +93,7 @@ public class PrepareTest {
|
||||||
|
|
||||||
Assertions.assertEquals(86, tmp.count());
|
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(1, tmp.filter(r -> r.getId().equals(doi1)).count());
|
||||||
Assertions.assertEquals(3, tmp.filter(r -> r.getId().equals(doi1)).collect().get(0).getMeasures().size());
|
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")
|
.textFile(workingDir.toString() + "/work/fos")
|
||||||
.map(item -> OBJECT_MAPPER.readValue(item, Result.class));
|
.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(50, tmp.count());
|
||||||
assertEquals(1, tmp.filter(row -> row.getId().equals(doi1)).count());
|
assertEquals(1, tmp.filter(row -> row.getId().equals(doi1)).count());
|
||||||
|
@ -220,7 +220,7 @@ public class PrepareTest {
|
||||||
.collect()
|
.collect()
|
||||||
.contains("nanoscience & nanotechnology"));
|
.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());
|
assertEquals(1, tmp.filter(row -> row.getId().equals(doi)).count());
|
||||||
assertTrue(
|
assertTrue(
|
||||||
tmp
|
tmp
|
||||||
|
|
|
@ -109,12 +109,12 @@ public class ProduceTest {
|
||||||
|
|
||||||
Assertions.assertEquals(135, tmp.count());
|
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
|
Assertions
|
||||||
.assertEquals(
|
.assertEquals(
|
||||||
3, tmp
|
3, tmp
|
||||||
.filter(row -> row.getId().equals("unresolved:10.3390/s18072310:doi"))
|
.filter(row -> row.getId().equals("unresolved::10.3390/s18072310::doi"))
|
||||||
.collect()
|
.collect()
|
||||||
.get(0)
|
.get(0)
|
||||||
.getSubject()
|
.getSubject()
|
||||||
|
@ -123,14 +123,14 @@ public class ProduceTest {
|
||||||
Assertions
|
Assertions
|
||||||
.assertEquals(
|
.assertEquals(
|
||||||
3, tmp
|
3, tmp
|
||||||
.filter(row -> row.getId().equals("unresolved:10.3390/s18072310:doi"))
|
.filter(row -> row.getId().equals("unresolved::10.3390/s18072310::doi"))
|
||||||
.collect()
|
.collect()
|
||||||
.get(0)
|
.get(0)
|
||||||
.getMeasures()
|
.getMeasures()
|
||||||
.size());
|
.size());
|
||||||
|
|
||||||
List<StructuredProperty> sbjs = tmp
|
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())
|
.flatMap(row -> row.getSubject().iterator())
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ public class ProduceTest {
|
||||||
sbjs.stream().anyMatch(sbj -> sbj.getValue().equals("nanoscience & nanotechnology"));
|
sbjs.stream().anyMatch(sbj -> sbj.getValue().equals("nanoscience & nanotechnology"));
|
||||||
|
|
||||||
List<Measure> measures = tmp
|
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())
|
.flatMap(row -> row.getMeasures().iterator())
|
||||||
.collect();
|
.collect();
|
||||||
Assertions
|
Assertions
|
||||||
|
@ -217,7 +217,7 @@ public class ProduceTest {
|
||||||
Assertions
|
Assertions
|
||||||
.assertEquals(
|
.assertEquals(
|
||||||
49, tmp
|
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)
|
.filter(row -> row.getSubject() != null)
|
||||||
.count());
|
.count());
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ public class ProduceTest {
|
||||||
.assertEquals(
|
.assertEquals(
|
||||||
85,
|
85,
|
||||||
tmp
|
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)
|
.filter(r -> r.getMeasures() != null)
|
||||||
.count());
|
.count());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue