forked from D-Net/dnet-hadoop
GetCSV refactoring - changed due to changes in input resource
This commit is contained in:
parent
a5f6edfa6c
commit
f3d575f749
|
@ -26,15 +26,6 @@ public class GetCSVTest {
|
|||
|
||||
private static LocalFileSystem fs;
|
||||
|
||||
@BeforeAll
|
||||
public static void beforeAll() throws IOException {
|
||||
workingDir = Files
|
||||
.createTempDirectory(GetCSVTest.class.getSimpleName())
|
||||
.toString();
|
||||
|
||||
fs = FileSystem.getLocal(new Configuration());
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
void getProgrammeFileTest() throws Exception {
|
||||
|
@ -100,6 +91,15 @@ public class GetCSVTest {
|
|||
Assertions.assertEquals(767, count);
|
||||
}
|
||||
|
||||
@BeforeAll
|
||||
public static void beforeAll() throws IOException {
|
||||
workingDir = Files
|
||||
.createTempDirectory(GetCSVTest.class.getSimpleName())
|
||||
.toString();
|
||||
|
||||
fs = FileSystem.getLocal(new Configuration());
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
void getProjectFileTest() throws IOException, CollectorException, ClassNotFoundException {
|
||||
|
@ -217,29 +217,29 @@ public class GetCSVTest {
|
|||
while ((line = in.readLine()) != null) {
|
||||
DOAJModel doaj = new ObjectMapper().readValue(line, DOAJModel.class);
|
||||
if (count == 0) {
|
||||
Assertions.assertTrue(doaj.getIssn().equals("0001-3765"));
|
||||
Assertions.assertTrue(doaj.getEissn().equals("1678-2690"));
|
||||
Assertions.assertTrue(doaj.getJournalTitle().equals("Anais da Academia Brasileira de Ciências"));
|
||||
Assertions.assertEquals("0001-3765", doaj.getIssn());
|
||||
Assertions.assertEquals("1678-2690", doaj.getEissn());
|
||||
Assertions.assertEquals("Anais da Academia Brasileira de Ciências", doaj.getJournalTitle());
|
||||
|
||||
}
|
||||
if (count == 7902) {
|
||||
|
||||
Assertions.assertTrue(doaj.getIssn().equals(""));
|
||||
Assertions.assertTrue(doaj.getEissn().equals("2055-7159"));
|
||||
Assertions.assertTrue(doaj.getJournalTitle().equals("BJR|case reports"));
|
||||
if (count == 7904) {
|
||||
System.out.println(new ObjectMapper().writeValueAsString(doaj));
|
||||
Assertions.assertEquals("",doaj.getIssn());
|
||||
Assertions.assertEquals("2055-7159", doaj.getEissn());
|
||||
Assertions.assertEquals("BJR|case reports", doaj.getJournalTitle());
|
||||
}
|
||||
if (count == 16703) {
|
||||
if (count == 16707) {
|
||||
|
||||
Assertions.assertTrue(doaj.getIssn().equals(""));
|
||||
Assertions.assertTrue(doaj.getEissn().equals("2788-6298"));
|
||||
Assertions.assertEquals("",doaj.getIssn());
|
||||
Assertions.assertEquals("2788-6298",doaj.getEissn());
|
||||
Assertions
|
||||
.assertTrue(doaj.getJournalTitle().equals("Teacher Education through Flexible Learning in Africa"));
|
||||
.assertEquals("Teacher Education through Flexible Learning in Africa", doaj.getJournalTitle());
|
||||
}
|
||||
|
||||
count += 1;
|
||||
}
|
||||
|
||||
Assertions.assertEquals(16709, count);
|
||||
Assertions.assertEquals(16713, count);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue