Skip to content
Snippets Groups Projects
Commit da9103f9 authored by Felix Reichenbach's avatar Felix Reichenbach
Browse files

Merge branch 'OZG-7517-add-Bescheid-item-name' into 'main'

OZG-7517 add itemName to SetBescheidSentStatusCommand

See merge request !2
parents 5a924e8d e1b997d8
No related branches found
No related tags found
1 merge request!2OZG-7517 add itemName to SetBescheidSentStatusCommand
......@@ -287,7 +287,8 @@ public class BescheidService {
.order(AttachedItemService.PATCH_ATTACHED_ITEM)
.bodyObject(Map.of(
AttachedItem.PROPERTY_ID, bescheidItem.getId(),
AttachedItem.PROPERTY_ITEM, buildBescheidSentStatusItem(userId)))
AttachedItem.PROPERTY_ITEM, buildBescheidSentStatusItem(userId),
AttachedItem.PROPERTY_ITEM_NAME, AttachedItemService.BESCHEID_ITEM_NAME))
.build();
}
......
......@@ -24,6 +24,7 @@
package de.ozgcloud.document.bescheid;
import static org.assertj.core.api.Assertions.*;
import static org.assertj.core.api.InstanceOfAssertFactories.*;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
......@@ -62,6 +63,12 @@ import de.ozgcloud.apilib.common.command.grpc.CommandMapper;
import de.ozgcloud.apilib.common.datatypes.GenericId;
import de.ozgcloud.apilib.user.OzgCloudUserId;
import de.ozgcloud.apilib.vorgang.OzgCloudVorgangId;
import de.ozgcloud.command.Command;
import de.ozgcloud.command.CommandTestFactory;
import de.ozgcloud.common.binaryfile.FileId;
import de.ozgcloud.common.datatype.StringBasedValue;
import de.ozgcloud.common.errorhandling.TechnicalException;
import de.ozgcloud.document.DocumentTestFactory;
import de.ozgcloud.document.bescheid.Bescheid.SendBy;
import de.ozgcloud.document.bescheid.administration.AdministrationService;
import de.ozgcloud.document.bescheid.attributes.ClientAttributeService;
......@@ -75,15 +82,9 @@ import de.ozgcloud.document.bescheid.vorgang.Vorgang;
import de.ozgcloud.document.bescheid.vorgang.VorgangId;
import de.ozgcloud.document.bescheid.vorgang.VorgangService;
import de.ozgcloud.document.bescheid.vorgang.VorgangTestFactory;
import de.ozgcloud.command.Command;
import de.ozgcloud.command.CommandTestFactory;
import de.ozgcloud.document.common.attached_item.AttachedItem;
import de.ozgcloud.document.common.attached_item.AttachedItemService;
import de.ozgcloud.document.common.attached_item.AttachedItemTestFactory;
import de.ozgcloud.common.binaryfile.FileId;
import de.ozgcloud.common.datatype.StringBasedValue;
import de.ozgcloud.common.errorhandling.TechnicalException;
import de.ozgcloud.document.DocumentTestFactory;
class BescheidServiceTest {
......@@ -1124,6 +1125,13 @@ class BescheidServiceTest {
assertThat(result.getBodyObject()).containsEntry(AttachedItem.PROPERTY_ITEM, itemMap);
}
@Test
void shouldSetPropertyItemName() {
var result = buildSetBescheidSentStatusCommand();
assertThat(result.getBodyObject()).containsEntry(AttachedItem.PROPERTY_ITEM_NAME, AttachedItemService.BESCHEID_ITEM_NAME);
}
private OzgCloudCommand buildSetBescheidSentStatusCommand() {
return service.buildSetBescheidSentStatusCommand(BESCHEID_ITEM, UserProfileTestFactory.ID_STR);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment