hostedbymap #136

Merged
claudio.atzori merged 60 commits from hostedbymap into beta 2021-08-12 17:10:55 +02:00
1 changed files with 8 additions and 10 deletions
Showing only changes of commit 8229632839 - Show all commits

View File

@ -7,6 +7,8 @@ import java.net.URLConnection;
import java.nio.charset.Charset;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import com.fasterxml.jackson.core.JsonProcessingException;
@ -29,18 +31,13 @@ public class TestReadCSV {
.build()
.parse();
ObjectMapper mapper = new ObjectMapper();
beans.forEach(r -> {
try {
System.out.println(mapper.writeValueAsString(r));
} catch (JsonProcessingException e) {
e.printStackTrace();
}
});
Assertions.assertEquals(36, beans.size());
Assertions.assertEquals(1, beans.stream().filter(e -> e.getIssn().equals("0001-625X")).count());
Assertions.assertTrue(beans.stream().anyMatch(e -> e.getIssn().equals("0001-625X") && e.getTitle().equals("Acta Mycologica")));
Assertions.assertTrue(beans.stream().allMatch(e -> e.getIssn().equals(e.getIssn_l())));
}
@Disabled
@Test
public void testCSVUrlUnibi() throws IOException {
@ -66,6 +63,7 @@ public class TestReadCSV {
);
}
@Disabled
@Test
public void testCSVUrlDOAJ() throws IOException {