Skip to content
Snippets Groups Projects
Commit d9dd0a8b authored by OZG-Cloud Team's avatar OZG-Cloud Team
Browse files

OZG-6354 adjust test

parent 1ecfb5b6
No related branches found
No related tags found
No related merge requests found
...@@ -175,7 +175,6 @@ class VorgangManagerServerResolverTest { ...@@ -175,7 +175,6 @@ class VorgangManagerServerResolverTest {
private ManagableStub<?> stub; private ManagableStub<?> stub;
private final Optional<String> organisationsEinheitenId = Optional.of(ZustaendigeStelleTestFactory.ORGANISATIONSEINHEIT_ID); private final Optional<String> organisationsEinheitenId = Optional.of(ZustaendigeStelleTestFactory.ORGANISATIONSEINHEIT_ID);
private final Class<? extends AbstractStub<?>> stubClass = VorgangServiceBlockingStub.class;
@DisplayName("on zufi strategy") @DisplayName("on zufi strategy")
@Nested @Nested
...@@ -191,7 +190,7 @@ class VorgangManagerServerResolverTest { ...@@ -191,7 +190,7 @@ class VorgangManagerServerResolverTest {
void shouldCallCreateStub() { void shouldCallCreateStub() {
createStub(); createStub();
verify(resolver).createStub(organisationsEinheitenId, stubFactory, stubClass); verify(resolver).createStub(organisationsEinheitenId, stubFactory, VorgangServiceBlockingStub.class);
} }
@Test @Test
...@@ -216,7 +215,7 @@ class VorgangManagerServerResolverTest { ...@@ -216,7 +215,7 @@ class VorgangManagerServerResolverTest {
void shouldCallCreateStub() { void shouldCallCreateStub() {
createStub(); createStub();
verify(resolver).createStubByConfiguredChannels(organisationsEinheitenId, stubFactory, stubClass); verify(resolver).createStubByConfiguredChannels(organisationsEinheitenId, stubFactory, VorgangServiceBlockingStub.class);
} }
@Test @Test
...@@ -227,8 +226,8 @@ class VorgangManagerServerResolverTest { ...@@ -227,8 +226,8 @@ class VorgangManagerServerResolverTest {
} }
} }
private <T extends AbstractStub<T>> ManagableStub<T> createStub() { private ManagableStub<VorgangServiceBlockingStub> createStub() {
return resolver.createStub(organisationsEinheitenId, stubFactory, stubClass); return resolver.createStub(organisationsEinheitenId, stubFactory, VorgangServiceBlockingStub.class);
} }
} }
...@@ -244,7 +243,6 @@ class VorgangManagerServerResolverTest { ...@@ -244,7 +243,6 @@ class VorgangManagerServerResolverTest {
private ManagedChannel managedChannel; private ManagedChannel managedChannel;
private Optional<String> organisationsEinheitenId = Optional.of(VorgangManagerListPropertiesTestFactory.ORGANISATIONSEINHEIT_ID); private Optional<String> organisationsEinheitenId = Optional.of(VorgangManagerListPropertiesTestFactory.ORGANISATIONSEINHEIT_ID);
private Class<? extends AbstractStub<?>> stubClass = VorgangServiceBlockingStub.class;
private final String vorgangManagerAddress = "dummyVorgangManagerAddress"; private final String vorgangManagerAddress = "dummyVorgangManagerAddress";
@BeforeEach @BeforeEach
...@@ -272,7 +270,7 @@ class VorgangManagerServerResolverTest { ...@@ -272,7 +270,7 @@ class VorgangManagerServerResolverTest {
void shouldCreateStub() { void shouldCreateStub() {
createCloseableStub(); createCloseableStub();
verify(stubFactory).createStub(stubClass, managedChannel); verify(stubFactory).createStub(VorgangServiceBlockingStub.class, managedChannel);
} }
@Test @Test
...@@ -290,8 +288,8 @@ class VorgangManagerServerResolverTest { ...@@ -290,8 +288,8 @@ class VorgangManagerServerResolverTest {
assertThat(createdStub.get()).isEqualTo(stub); assertThat(createdStub.get()).isEqualTo(stub);
} }
private <T extends AbstractStub<T>> ManagableStub<T> createCloseableStub() { private ManagableStub<VorgangServiceBlockingStub> createCloseableStub() {
return resolver.createCloseableStub(organisationsEinheitenId, stubFactory, stubClass); return resolver.createCloseableStub(organisationsEinheitenId, stubFactory, VorgangServiceBlockingStub.class);
} }
} }
...@@ -384,7 +382,7 @@ class VorgangManagerServerResolverTest { ...@@ -384,7 +382,7 @@ class VorgangManagerServerResolverTest {
private ManagableStub<?> createStubByConfiguredChannels() { private ManagableStub<?> createStubByConfiguredChannels() {
return resolver.createStubByConfiguredChannels(Optional.of(VorgangManagerListPropertiesTestFactory.ORGANISATIONSEINHEIT_ID), stubFactory, return resolver.createStubByConfiguredChannels(Optional.of(VorgangManagerListPropertiesTestFactory.ORGANISATIONSEINHEIT_ID), stubFactory,
stubClass); VorgangServiceBlockingStub.class);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment