tests
This commit is contained in:
parent
d9288c7657
commit
5b4597a4ae
|
@ -1,5 +1,6 @@
|
|||
package eu.dnetlib.openaire.community.importer;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
@ -39,7 +40,12 @@ class CommunityImporterServiceTest {
|
|||
public void testImportPropagationOrganizationsFromProfile() throws Exception {
|
||||
final String profile = IOUtils.toString(getClass().getResourceAsStream("old_provision_wf.xml"), StandardCharsets.UTF_8.toString());
|
||||
final List<DbOrganization> list = importer.importPropagationOrganizationsFromProfile(profile, true);
|
||||
list.forEach(System.out::println);
|
||||
// list.forEach(System.out::println);
|
||||
|
||||
assertEquals(245, list.size());
|
||||
assertEquals(1, list.stream().filter(o -> o.getOrgId().equals("20|openorgs____::9dd5545aacd3d8019e00c3f837269746")).count());
|
||||
assertEquals(2, list.stream().filter(o -> o.getOrgId().equals("20|openorgs____::d11f981828c485cd23d93f7f24f24db1")).count());
|
||||
assertEquals(14, list.stream().filter(o -> o.getCommunity().equals("beopen")).count());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue