Skip to content
Snippets Groups Projects
Commit c188c253 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5031 mock UserNotificationEventListener in ITCase

parent 75dfe723
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,7 @@ import de.ozgcloud.command.Command;
import de.ozgcloud.command.CommandCreatedEvent;
import de.ozgcloud.command.VorgangAttachedItemCreatedEvent;
import de.ozgcloud.common.test.ITCase;
import de.ozgcloud.notification.user.UserNotificationEventListener;
import de.ozgcloud.vorgang.VorgangManagerServerApplication;
import de.ozgcloud.vorgang.attached_item.VorgangAttachedItem;
import de.ozgcloud.vorgang.command.CommandService;
......@@ -74,6 +75,9 @@ class PostfachEventListenerITCase {
@MockBean
private CommandService commandService;
@MockBean
private UserNotificationEventListener userNotificationEventListener;
@Nested
class TestSendPostfachNachricht {
......@@ -103,7 +107,8 @@ class PostfachEventListenerITCase {
private static final Command COMMAND = CommandTestFactory.createBuilder().order(Order.CREATE_ATTACHED_ITEM.name())
.bodyObject(Map.of(VorgangAttachedItem.FIELDNAME_ITEM_NAME, AttachedItemRemoteService.ITEM_NAME,
PostfachNachricht.FIELD_DIRECTION, "IN")).build();
PostfachNachricht.FIELD_DIRECTION, "IN"))
.build();
@Test
void shouldCallListener() {
......@@ -141,7 +146,8 @@ class PostfachEventListenerITCase {
void shouldNotCallListenerOnWrongDirection() {
var command = CommandTestFactory.createBuilder().order(Order.CREATE_ATTACHED_ITEM.name())
.bodyObject(Map.of(VorgangAttachedItem.FIELDNAME_ITEM_NAME, AttachedItemRemoteService.ITEM_NAME,
PostfachNachricht.FIELD_DIRECTION, "OUT")).build();
PostfachNachricht.FIELD_DIRECTION, "OUT"))
.build();
publisher.publishEvent(new VorgangAttachedItemCreatedEvent(command, CommandTestFactory.CREATED_RESOURCE));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment