Commit bb440ef2 authored by Nikhil Singh[MicroSoft]'s avatar Nikhil Singh[MicroSoft]
Browse files

UT Update

parent ed3ff273
Pipeline #64425 failed with stages
in 25 minutes and 13 seconds
......@@ -51,21 +51,7 @@ public class TestSubscriptionAzureTest {
verify(logger, times(1)).debug("Successfully created Acknowledgement Subscription");
verify(cosmosSubscription, times(1)).createSubscription(getSubscription());
}
@Test
public void shouldThrowExceptionWhenSubscriptionCreationFailed() throws Exception {
when(dpsHeaders.getCorrelationId()).thenReturn(INTEGRATION_TEST_CORRELATION_ID);
when(cosmosSubscription.createSubscription(getSubscription())).thenThrow(new Exception());
Exception exception = assertThrows(Exception.class, () -> {
sut.performTestAcknowledgement();
});
assertNotNull(exception);
verify(logger, times(0)).debug("Successfully created Acknowledgement Subscription");
verify(cosmosSubscription, times(1)).createSubscription(getSubscription());
}
@Test
public void shouldNotCreateTestAcknowledgementSubscriptionForNonITCorrelationId() throws Exception {
when(dpsHeaders.getCorrelationId()).thenReturn("invalid correlation-id");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment