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

OZG-6162 add qualifier in BescheidITCase

parent c18ed4ac
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@ import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.boot.test.mock.mockito.SpyBean;
......@@ -57,6 +58,7 @@ import com.mongodb.client.gridfs.model.GridFSFile;
import de.ozgcloud.apilib.user.OzgCloudUserId;
import de.ozgcloud.apilib.user.OzgCloudUserProfile;
import de.ozgcloud.apilib.user.OzgCloudUserProfileService;
import de.ozgcloud.collaboration.CollaborationManagerConfiguration;
import de.ozgcloud.command.Command;
import de.ozgcloud.command.CommandStatus;
import de.ozgcloud.common.test.DataITCase;
......@@ -110,7 +112,8 @@ class BescheidITCase {
@MockBean
private PostfachRemoteService postfachRemoteService;
@MockBean
private OzgCloudUserProfileService userProfileService;
@Qualifier(CollaborationManagerConfiguration.OZG_CLOUD_USER_PROFILE_SERVICE_NAME)
private OzgCloudUserProfileService documentUserProfileService;
@Captor
private ArgumentCaptor<BescheidDocumentCreatedEvent> bescheidDocumentCreatedEventCaptor;
......@@ -120,7 +123,7 @@ class BescheidITCase {
mongoOperations.dropCollection(VorgangAttachedItem.COLLECTION_NAME);
mongoOperations.dropCollection(Vorgang.COLLECTION_NAME);
when(postfachRemoteService.getPostfachType()).thenReturn(ServiceKontoTestFactory.TYPE);
when(userProfileService.getById(any())).thenReturn(OzgCloudUserProfile.builder().id(OzgCloudUserId.from(USER_ID)).build());
when(documentUserProfileService.getById(any())).thenReturn(OzgCloudUserProfile.builder().id(OzgCloudUserId.from(USER_ID)).build());
}
@Nested
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment