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.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 {