Skip to content
Snippets Groups Projects
Commit 27792468 authored by Sanjeev-SLB's avatar Sanjeev-SLB
Browse files

Reverted test case changes

parent 88cf1a57
No related branches found
No related tags found
3 merge requests!232Update os-core-lib-azure,!231initial commit,!201Fixed exceptions
Pipeline #102642 failed
......@@ -93,9 +93,14 @@ public class ProcessNotificationTest {
response.setResponseCode(400);
when(requestBodyAdapter.extractNotificationContent(message, subscriptionName)).thenReturn(notificationContent);
when(notificationHandler.notifySubscriber(notificationId, notificationData, requestAttributes)).thenReturn(response);
processNotification.performNotification(message, subscriptionName);
verify(notificationHandler, times(1)).notifySubscriber(notificationId, notificationData, requestAttributes);
verify(requestBodyAdapter, times(1)).extractNotificationContent(message, subscriptionName);
try {
processNotification.performNotification(message, subscriptionName);
fail(EXCEPTION_NOT_THROWN);
} catch (Exception e) {
verify(notificationHandler, times(1)).notifySubscriber(notificationId, notificationData, requestAttributes);
verify(requestBodyAdapter, times(1)).extractNotificationContent(message, subscriptionName);
Assert.assertEquals(NOT_ACKNOWLEDGE, e.getMessage());
}
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment