changed the project test according to the newly introduced join with the db project codes

This commit is contained in:
Miriam Baglioni 2020-05-28 23:53:24 +02:00
parent 782984d8e5
commit 6989fb9c8a
1 changed files with 6 additions and 3 deletions

View File

@ -67,7 +67,7 @@ public class PrepareProjectTest {
}
@Test
public void numberDistinctProgrammeTest() throws Exception {
public void numberDistinctProjectTest() throws Exception {
PrepareProjects
.main(
new String[] {
@ -76,7 +76,10 @@ public class PrepareProjectTest {
"-projectPath",
getClass().getResource("/eu/dnetlib/dhp/actionmanager/project/projects_subset.json").getPath(),
"-outputPath",
workingDir.toString() + "/preparedProjects"
workingDir.toString() + "/preparedProjects",
"-dbProjectPath",
getClass().getResource("/eu/dnetlib/dhp/actionmanager/project/dbProject").getPath(),
});
final JavaSparkContext sc = new JavaSparkContext(spark.sparkContext());
@ -85,7 +88,7 @@ public class PrepareProjectTest {
.textFile(workingDir.toString() + "/preparedProjects")
.map(item -> OBJECT_MAPPER.readValue(item, CSVProject.class));
Assertions.assertEquals(20, tmp.count());
Assertions.assertEquals(8, tmp.count());
Dataset<CSVProject> verificationDataset = spark.createDataset(tmp.rdd(), Encoders.bean(CSVProject.class));