diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachProperties.java b/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachProperties.java index 366716ba3f5849248e8ab9817513117fa2b5da54..71dca6ba0e1c4ae305498edcbd332a7a79990d26 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachProperties.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/postfach/PostfachProperties.java @@ -23,8 +23,6 @@ */ package de.ozgcloud.alfa.postfach; -import java.util.Map; - import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.context.annotation.Configuration; @@ -46,9 +44,4 @@ public class PostfachProperties { */ private String signatur = ""; - /** - * Settings that are linked to an Organisationseinheit. Configured by administration config server. - */ - private Map<String, Map<String, Object>> organisationsEinheitSettings = Map.of(); - } diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachPropertiesTest.java b/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachPropertiesTest.java index d886861a56502ed102ffc52d3ef4368c13a358d9..aa2ee8db2cab1862e102d11a5bc449397cea5e4d 100644 --- a/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachPropertiesTest.java +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachPropertiesTest.java @@ -34,15 +34,13 @@ import org.springframework.test.context.TestPropertySource; @SpringBootTest(classes = { PostfachPropertiesTestConfiguration.class }) class PostfachPropertiesTest { - private static final String ORGANISATIONSEINHEITEN_ID = "oe1"; + private static final String TEST_SIG = "test1"; - private static final String TEST_ORGANISATIONS_SIG = OrganisationsEinheitSettingsTestFactory.TEST_SIGNATUR; @DisplayName("Test loading postfach configuration") @Nested @TestPropertySource(properties = { - PostfachProperties.PREFIX + ".signatur=" + TEST_SIG, - PostfachProperties.PREFIX + ".organisations-einheit-settings." + ORGANISATIONSEINHEITEN_ID + ".signatur=" + TEST_ORGANISATIONS_SIG, + PostfachProperties.PREFIX + ".signatur=" + TEST_SIG }) class TestLoadingPostfachProperties { @@ -58,34 +56,9 @@ class PostfachPropertiesTest { } @Test - void shouldHaveOrganisationsEinheitSettings() { - assertThat(postfachProperties.getOrganisationsEinheitSettings()).isNotNull(); + void shouldHaveSignatur() { + assertThat(postfachProperties.getSignatur()).isEqualTo(TEST_SIG); } } } - - @DisplayName("Test mapping organisations einheit settings") - @Nested - @TestPropertySource(properties = { - PostfachProperties.PREFIX + ".signatur=" + TEST_SIG, - PostfachProperties.PREFIX + ".organisations-einheit-settings.oe1.signatur=" + TEST_ORGANISATIONS_SIG, - }) - class TestMapOrganisationsEinheitSettings { - - @Autowired - private PostfachProperties postfachProperties; - - @Test - void shouldHaveOrganisationsEinheit() { - var props = postfachProperties.getOrganisationsEinheitSettings(); - - assertThat(props).containsKey(ORGANISATIONSEINHEITEN_ID); - } - - @Test - void shouldHaveOrganisationsEinheitSetting() { - assertThat(postfachProperties.getOrganisationsEinheitSettings().get(ORGANISATIONSEINHEITEN_ID)).hasFieldOrPropertyWithValue("signatur", - TEST_ORGANISATIONS_SIG); - } - } }