diff options
| author | Paul-Christian Volkmer | 2025-10-23 11:08:10 +0200 |
|---|---|---|
| committer | Paul-Christian Volkmer | 2025-10-23 11:09:54 +0200 |
| commit | 84fb0d829832bf1628112376bba729422b169402 (patch) | |
| tree | 4828674b77105877dccfcccb380da3f7c0f75987 /src/test/java/dev/dnpm/oshelper/config/PluginConfigurationTest.java | |
| parent | 61e7dfcbe637f401f81ff853e9bd10c90b325acb (diff) | |
refactor: change package name
Diffstat (limited to 'src/test/java/dev/dnpm/oshelper/config/PluginConfigurationTest.java')
| -rw-r--r-- | src/test/java/dev/dnpm/oshelper/config/PluginConfigurationTest.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/test/java/dev/dnpm/oshelper/config/PluginConfigurationTest.java b/src/test/java/dev/dnpm/oshelper/config/PluginConfigurationTest.java new file mode 100644 index 0000000..bed0e17 --- /dev/null +++ b/src/test/java/dev/dnpm/oshelper/config/PluginConfigurationTest.java @@ -0,0 +1,46 @@ +package dev.dnpm.oshelper.config; + +import dev.dnpm.oshelper.services.FormService; +import dev.dnpm.oshelper.services.SettingsService; +import dev.dnpm.oshelper.services.therapieplan.TherapieplanServiceFactory; +import dev.dnpm.oshelper.services.consent.ConsentManagerServiceFactory; +import de.itc.onkostar.api.IOnkostarApi; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import static org.assertj.core.api.Assertions.assertThat; + +@ExtendWith(MockitoExtension.class) +class PluginConfigurationTest { + + @Mock + private IOnkostarApi onkostarApi; + + @Mock + private SettingsService settingsService; + + @Mock + private FormService formService; + + private PluginConfiguration configuration; + + @BeforeEach + void setup() { + this.configuration = new PluginConfiguration(); + } + + @Test + void testShouldReturnConsentManagerServiceFactory() { + var actual = this.configuration.consentManagerServiceFactory(onkostarApi); + assertThat(actual).isInstanceOf(ConsentManagerServiceFactory.class); + } + + @Test + void testShouldReturnTherapieplanServiceFactory() { + var actual = this.configuration.therapieplanServiceFactory(onkostarApi, settingsService, formService); + assertThat(actual).isInstanceOf(TherapieplanServiceFactory.class); + } +} |
