-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SELC-441] feat: Solved errors in junit tests
- Loading branch information
1 parent
f2a1575
commit ef8ff1e
Showing
2 changed files
with
16 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,8 +57,10 @@ class UserServiceTest { | |
|
||
@InjectMock | ||
private UserInstitutionService userInstitutionService; | ||
|
||
@InjectMock | ||
private UserNotificationService userNotificationService; | ||
|
||
@InjectMock | ||
private UserInfoService userInfoService; | ||
|
||
|
@@ -116,13 +118,12 @@ void getUsersEmailsTest() { | |
UniAssertSubscriber<List<String>> subscriber = userService | ||
.getUsersEmails("institutionId", "productId") | ||
.subscribe() | ||
.withSubscriber(UniAssertSubscriber.create()) | ||
.assertCompleted(); | ||
.withSubscriber(UniAssertSubscriber.create()); | ||
|
||
List<String> actual = subscriber.assertCompleted().getItem(); | ||
assertNotNull(actual); | ||
assertEquals(1, actual.size()); | ||
assertEquals("[email protected]", actual.get(0)); | ||
subscriber.assertCompleted(); | ||
|
||
verify(userRegistryApi).findByIdUsingGET(anyString(), anyString()); | ||
verify(userInstitutionService).findAllWithFilter(any()); | ||
} | ||
|
||
@Test | ||
|
@@ -487,11 +488,13 @@ void testUpdateUserStatus() { | |
any()) | ||
).thenReturn(Uni.createFrom().nullItem()); | ||
|
||
userService.updateUserProductStatus("userId", "institutionId", "productId", OnboardedProductState.ACTIVE, | ||
var subscriber = userService.updateUserProductStatus("userId", "institutionId", "productId", OnboardedProductState.ACTIVE, | ||
LoggedUser.builder().build()) | ||
.subscribe() | ||
.withSubscriber(UniAssertSubscriber.create()); | ||
|
||
subscriber.awaitItem(); | ||
|
||
verify(userNotificationService, times(1)).sendEmailNotification( | ||
any(UserResource.class), | ||
any(UserInstitution.class), | ||
|