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

OZG-6162 add qualifier in CollaborationITCase

parent abb212c5
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@ import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
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.data.mongodb.core.MongoOperations;
......@@ -61,6 +62,7 @@ import com.thedeanda.lorem.LoremIpsum;
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.collaboration.CollaborationRequest;
import de.ozgcloud.collaboration.CollaborationServiceGrpc.CollaborationServiceBlockingStub;
import de.ozgcloud.collaboration.GrpcGetFileContentRequest;
......@@ -122,7 +124,8 @@ class CollaborationITCase {
private MongoOperations mongoOperations;
@MockBean
private OzgCloudUserProfileService ozgCloudUserProfileService;
@Qualifier(CollaborationManagerConfiguration.OZG_CLOUD_USER_PROFILE_SERVICE_NAME)
private OzgCloudUserProfileService collaborationOzgCloudUserProfileService;
@MockBean
private PostfachRemoteService postfachRemoteService;
......@@ -241,7 +244,7 @@ class CollaborationITCase {
@BeforeEach
void init() {
when(ozgCloudUserProfile.getId()).thenReturn(OzgCloudUserId.from(CommandTestFactory.CREATED_BY));
when(ozgCloudUserProfileService.getById(any())).thenReturn(ozgCloudUserProfile);
when(collaborationOzgCloudUserProfileService.getById(any())).thenReturn(ozgCloudUserProfile);
}
@Test
......@@ -289,7 +292,7 @@ class CollaborationITCase {
@BeforeEach
void init() {
when(ozgCloudUserProfile.getId()).thenReturn(OzgCloudUserId.from(CommandTestFactory.CREATED_BY));
when(ozgCloudUserProfileService.getById(any())).thenReturn(ozgCloudUserProfile);
when(collaborationOzgCloudUserProfileService.getById(any())).thenReturn(ozgCloudUserProfile);
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment