Skip to content
Snippets Groups Projects
Commit 4c67ab83 authored by Martin's avatar Martin
Browse files

OZG-725 OZG-7990 cleanup

parent ff3246d2
No related branches found
No related tags found
1 merge request!24Ozg 725 move link
......@@ -204,184 +204,4 @@ public class OrganisationsEinheitVorgangWithEingangProcessorTest {
}
}
}
// @Nested
// class TestForwardByOzgCloudLink {
//
// @Test
// void shouldCallIsForwardableByOzgCloud() {
// doReturn(false).when(processor).isForwardableByOzgCloud(any());
//
// processor.process(EntityModel.of(vorgang));
//
// verify(processor).isForwardableByOzgCloud(vorgang);
// }
//
// @Nested
// class TestOnIsNotForwardableByOzgCloud {
//
// @BeforeEach
// void givenIsNotForwardableByOzgCloud() {
// doReturn(false).when(processor).isForwardableByOzgCloud(any());
// }
//
// @Test
// void shouldNotAddLink() {
// var model = processor.process(EntityModel.of(vorgang));
//
// assertThat(model.getLink(ForwardingVorgangWithEingangProcessor.REL_FORWARD_BY_OZGCLOUD)).isEmpty();
// }
// }
//
// @Nested
// class TestOnIsForwardableByOzgCloud {
//
// @BeforeEach
// void givenIsNotForwardableByOzgCloud() {
// doReturn(true).when(processor).isForwardableByOzgCloud(any());
// }
//
// @Test
// void shouldAddForwardByOzgCloudLink() {
// var expectedHref = UriComponentsBuilder.fromUriString(ForwardByVorgangCommandController.PATH)
// .buildAndExpand(VorgangHeaderTestFactory.ID, VorgangHeaderTestFactory.VERSION).toString();
//
// var model = processor.process(EntityModel.of(vorgang));
//
// assertThat(model.getLink(ForwardingVorgangWithEingangProcessor.REL_FORWARD_BY_OZGCLOUD)).get()
// .extracting(Link::getHref)
// .isEqualTo(expectedHref);
// }
// }
// }
//
// @Nested
// class TestForwardByEmailLink {
//
// @Test
// void shouldCallIsForwardableByEmail() {
// doReturn(false).when(processor).isForwardableByEmail();
//
// processor.process(EntityModel.of(vorgang));
//
// verify(processor).isForwardableByEmail();
// }
//
// @Nested
// class TestOnIsNotForwardableByEmail {
//
// @BeforeEach
// void givenIsNotForwardableByEmail() {
// doReturn(false).when(processor).isForwardableByEmail();
// }
//
// @Test
// void shouldNotAddLink() {
// var model = processor.process(EntityModel.of(vorgang));
//
// assertThat(model.getLink(ForwardingVorgangWithEingangProcessor.REL_FORWARD_BY_EMAIL)).isEmpty();
// }
// }
//
// @Nested
// class TestOnIsForwardableByEmail {
//
// @BeforeEach
// void givenIsForwardableByEmail() {
// doReturn(true).when(processor).isForwardableByEmail();
// }
//
// @Test
// void shouldAddLink() {
// var expectedHref = UriComponentsBuilder.fromUriString(ForwardingController.LIST_PATH)
// .queryParam(ForwardingController.PARAM_VORGANG_ID, VorgangHeaderTestFactory.ID).build().toString();
//
// var model = processor.process(EntityModel.of(vorgang));
//
// assertThat(model.getLink(ForwardingVorgangWithEingangProcessor.REL_FORWARD_BY_EMAIL)).get()
// .extracting(Link::getHref)
// .isEqualTo(expectedHref);
// }
// }
// }
// }
//
// @Nested
// class TestIsForwardableByOzgCloud {
//
// @Nested
// class TestOnFeatureDisabled {
//
// @BeforeEach
// void givenFeatureDisabled() {
// when(featureToggleProperties.isForwardByOzgCloudEnabled()).thenReturn(false);
// }
//
// @ParameterizedTest
// @EnumSource
// void shouldReturnFalse(VorgangStatus status) {
// var vorgang = VorgangWithEingangTestFactory.createBuilder().status(status).build();
//
// var forwardableByOzgCloud = processor.isForwardableByOzgCloud(vorgang);
//
// assertThat(forwardableByOzgCloud).isFalse();
// }
// }
//
// @Nested
// class TestOnFeatureEnabled {
//
// @BeforeEach
// void givenFeatureEnabled() {
// when(featureToggleProperties.isForwardByOzgCloudEnabled()).thenReturn(true);
// }
//
// @Nested
// class TestOnVorgangNotNeu {
// @ParameterizedTest
// @EnumSource(mode = Mode.EXCLUDE, names = { "NEU" })
// void shouldReturnFalseOnVorgangStatusNotNeu(VorgangStatus status) {
// var vorgang = VorgangWithEingangTestFactory.createBuilder().status(status).build();
//
// var forwardableByOzgCloud = processor.isForwardableByOzgCloud(vorgang);
//
// assertThat(forwardableByOzgCloud).isFalse();
// }
// }
//
// @Nested
// class TestOnVorgangIsNeu {
//
// private final VorgangWithEingang newVorgang = VorgangWithEingangTestFactory.createBuilder().status(VorgangStatus.NEU).build();
//
// @Test
// void shouldReturnTrue() {
// var forwardableByOzgCloud = processor.isForwardableByOzgCloud(newVorgang);
//
// assertThat(forwardableByOzgCloud).isTrue();
// }
// }
// }
// }
//
// @Nested
// class TestIsForwardableByEmail {
//
// @Test
// void shouldCallUserServiceForCurrentRole() {
// processor.isForwardableByEmail();
//
// verify(userService).hasRole(UserRole.EINHEITLICHER_ANSPRECHPARTNER);
// }
//
// @ParameterizedTest
// @ValueSource(booleans = { true, false })
// void shouldReturnIsEinheitlicherAnsprechpartner(boolean isEinheitlicherAnsprechpartner) {
// when(userService.hasRole(any())).thenReturn(isEinheitlicherAnsprechpartner);
//
// var isForwardableByEmail = processor.isForwardableByEmail();
//
// assertThat(isForwardableByEmail).isEqualTo(isEinheitlicherAnsprechpartner);
// }
// }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment