From 470c4b0f2037288d25cb7eedc7b0ccd30006297b Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 18 Feb 2019 09:07:23 +0100 Subject: [PATCH] default configuration includes configurationId --- .../eu/dnetlib/pace/config/dedupConfig.st | 3 ++- .../java/eu/dnetlib/pace/config/ConfigTest.java | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dnet-pace-core/src/main/resources/eu/dnetlib/pace/config/dedupConfig.st b/dnet-pace-core/src/main/resources/eu/dnetlib/pace/config/dedupConfig.st index 5cda4d9285..97aef2d237 100644 --- a/dnet-pace-core/src/main/resources/eu/dnetlib/pace/config/dedupConfig.st +++ b/dnet-pace-core/src/main/resources/eu/dnetlib/pace/config/dedupConfig.st @@ -10,7 +10,8 @@ "groupMaxSize" : "$groupMaxSize$", "slidingWindowSize" : "$slidingWindowSize$", "rootBuilder" : [ $rootBuilder:{"$it$"};separator=", "$ ], - "includeChildren" : "$includeChildren$" + "includeChildren" : "$includeChildren$", + "configurationId" : "$configurationId$" }, "pace" : { "clustering" : [ diff --git a/dnet-pace-core/src/test/java/eu/dnetlib/pace/config/ConfigTest.java b/dnet-pace-core/src/test/java/eu/dnetlib/pace/config/ConfigTest.java index 6b5a2b99ce..b85713abb3 100644 --- a/dnet-pace-core/src/test/java/eu/dnetlib/pace/config/ConfigTest.java +++ b/dnet-pace-core/src/test/java/eu/dnetlib/pace/config/ConfigTest.java @@ -48,12 +48,20 @@ public class ConfigTest extends AbstractPaceTest { @Test public void testLoadDefaults() throws IOException { + final String entityType = "organization"; + final String configurationId = "dedup-organization-simple"; + final Map config = Maps.newHashMap(); - config.put("entityType", "organization"); - config.put("configurationId", "dedup-organization-simple"); + + config.put("entityType", entityType); + config.put("configurationId", configurationId); final DedupConfig dedupConf = DedupConfig.loadDefault(config); - System.out.println("dedupConf = " + dedupConf); + //System.out.println("dedupConf = " + dedupConf); + assertNotNull(dedupConf); + assertNotNull(dedupConf.getWf()); + assertEquals(dedupConf.getWf().getEntityType(), entityType); + assertEquals(dedupConf.getWf().getConfigurationId(), configurationId); }