forked from D-Net/dnet-hadoop
adding assertions to the mapping of the unibi part of gold list
This commit is contained in:
parent
b1c6140ebf
commit
8229632839
|
@ -7,6 +7,8 @@ import java.net.URLConnection;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
@ -29,18 +31,13 @@ public class TestReadCSV {
|
||||||
.build()
|
.build()
|
||||||
.parse();
|
.parse();
|
||||||
|
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
Assertions.assertEquals(36, beans.size());
|
||||||
|
Assertions.assertEquals(1, beans.stream().filter(e -> e.getIssn().equals("0001-625X")).count());
|
||||||
beans.forEach(r -> {
|
Assertions.assertTrue(beans.stream().anyMatch(e -> e.getIssn().equals("0001-625X") && e.getTitle().equals("Acta Mycologica")));
|
||||||
try {
|
Assertions.assertTrue(beans.stream().allMatch(e -> e.getIssn().equals(e.getIssn_l())));
|
||||||
System.out.println(mapper.writeValueAsString(r));
|
|
||||||
} catch (JsonProcessingException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@Disabled
|
||||||
@Test
|
@Test
|
||||||
public void testCSVUrlUnibi() throws IOException {
|
public void testCSVUrlUnibi() throws IOException {
|
||||||
|
|
||||||
|
@ -66,6 +63,7 @@ public class TestReadCSV {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Disabled
|
||||||
@Test
|
@Test
|
||||||
public void testCSVUrlDOAJ() throws IOException {
|
public void testCSVUrlDOAJ() throws IOException {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue