forked from mosip/id-authentication
-
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.
MOSIP-38556 Fixed notification issue via phone channel (mosip#1397)
* MOSIP-38556 Fixed notification issue via phone channel Signed-off-by: kameshsr <[email protected]> * MOSIP-38556 Added unit test case Signed-off-by: kameshsr <[email protected]> --------- Signed-off-by: kameshsr <[email protected]>
- Loading branch information
Showing
2 changed files
with
12 additions
and
2 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
import java.util.Set; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
import io.mosip.idrepository.core.constant.IdRepoErrorConstants; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
@@ -116,4 +117,13 @@ public void TestInvalidNotificationConfig() throws IdAuthenticationBusinessExcep | |
Mockito.when(restHelper.requestAsync(Mockito.any())).thenReturn(Supplier); | ||
notificationManager.sendEmailNotification("[email protected]", "test", "test"); | ||
} | ||
|
||
@Test(expected = IdAuthenticationBusinessException.class) | ||
public void testInValidSendNotificationPhone() throws IdAuthenticationBusinessException, RestServiceException { | ||
Set<NotificationType> notificationtype = new HashSet<>(); | ||
notificationtype.add(NotificationType.SMS); | ||
Mockito.when(restHelper.requestSync(Mockito.any())) | ||
.thenThrow(new RestServiceException(IdRepoErrorConstants.UNKNOWN_ERROR)); | ||
notificationManager.sendSmsNotification("1234567890", "test"); | ||
} | ||
} |