EntsoeCaseRepositoryConfig { public static EntsoeCaseRepositoryConfig load() { return load(PlatformConfig.defaultConfig()); } EntsoeCaseRepositoryConfig(Path rootDir, Multimap<EntsoeGeographicalCode, String> forbiddenFormatsByGeographicalCode); static EntsoeCaseRepositoryConfig load(); Path getRootDir(); Multimap<EntsoeGeographicalCode, String> getForbiddenFormatsByGeographicalCode(); @Override String toString();  }
@Test public void testLoad() throws Exception { moduleConfig.setStringListProperty("forbiddenFormats_FR", Collections.singletonList("CIM1")); moduleConfig.setStringListProperty("forbiddenFormats_BE", Collections.singletonList("CIM1")); config = EntsoeCaseRepositoryConfig.load(platformConfig, Arrays.asList("CIM1", "UCTE")); assertEquals("/config", config.getRootDir().toString()); assertEquals(2, config.getForbiddenFormatsByGeographicalCode().size()); assertEquals(Collections.singleton("CIM1"), config.getForbiddenFormatsByGeographicalCode().get(EntsoeGeographicalCode.FR)); assertEquals(Collections.singleton("CIM1"), config.getForbiddenFormatsByGeographicalCode().get(EntsoeGeographicalCode.BE)); assertTrue(config.getForbiddenFormatsByGeographicalCode().get(EntsoeGeographicalCode.D2).isEmpty()); }
@Test public void testUnsupportedFormatIssue() throws Exception { moduleConfig.setStringListProperty("forbiddenFormats_FR", Collections.singletonList("UCT")); try { config = EntsoeCaseRepositoryConfig.load(platformConfig, Collections.singletonList("UCTE")); fail(); } catch (Exception ignored) { } }