2018-11-05 17:22:59 +01:00
|
|
|
package eu.dnetlib.pace.clustering;
|
|
|
|
|
|
|
|
import eu.dnetlib.pace.AbstractProtoPaceTest;
|
|
|
|
import eu.dnetlib.pace.config.Config;
|
|
|
|
import eu.dnetlib.pace.config.Type;
|
|
|
|
import eu.dnetlib.pace.model.FieldListImpl;
|
|
|
|
import eu.dnetlib.pace.model.FieldValueImpl;
|
|
|
|
import eu.dnetlib.pace.model.MapDocument;
|
|
|
|
import org.apache.commons.logging.Log;
|
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
|
import org.junit.Before;
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
public class ClusteringCombinerTest extends AbstractProtoPaceTest {
|
|
|
|
|
|
|
|
private static final Log log = LogFactory.getLog(ClusteringCombinerTest.class);
|
|
|
|
|
|
|
|
private Config config;
|
|
|
|
|
|
|
|
@Before
|
|
|
|
public void setUp() {
|
2019-11-07 12:47:12 +01:00
|
|
|
config = getOrganizationTestConf();
|
2018-11-05 17:22:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void testCombine() {
|
|
|
|
|
2019-11-07 12:47:12 +01:00
|
|
|
final MapDocument organization = organization(config, "A", "University of Turin", "UNITO");
|
|
|
|
log.info("University of Turin");
|
|
|
|
log.info(ClusteringCombiner.combine(organization, config));
|
|
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
|
|
public void testCombineBlacklistAware() {
|
2018-11-05 17:22:59 +01:00
|
|
|
|
2019-11-07 12:47:12 +01:00
|
|
|
final MapDocument organization = organization(config, "A", "University of Turin", "UNITO");
|
|
|
|
log.info("University of Turin");
|
|
|
|
log.info(BlacklistAwareClusteringCombiner.filterAndCombine(organization, config));
|
2018-11-05 17:22:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|