found another bug in standalone subscriptions

This commit is contained in:
Ken Stevens 2019-02-02 17:14:05 -05:00
parent 3662d080d0
commit dd0b56142d
1 changed files with 10 additions and 0 deletions

View File

@ -45,4 +45,14 @@ public class StandaloneSubscriptionMessageHandlerTest extends BaseSubscriptionDs
Mockito.verify(mySubscriptionRegistry, never()).registerSubscriptionUnlessAlreadyRegistered(any()); Mockito.verify(mySubscriptionRegistry, never()).registerSubscriptionUnlessAlreadyRegistered(any());
Mockito.verify(mySubscriptionMatchingSubscriber).matchActiveSubscriptionsAndDeliver(any()); Mockito.verify(mySubscriptionMatchingSubscriber).matchActiveSubscriptionsAndDeliver(any());
} }
@Test
public void deleteSubscription() {
Subscription subscription = makeSubscriptionWithStatus("testCriteria", "testPayload", "testEndpoint", Subscription.SubscriptionStatus.REQUESTED);
ResourceModifiedMessage message = new ResourceModifiedMessage(myFhirContext, subscription, ResourceModifiedMessage.OperationTypeEnum.DELETE);
ResourceModifiedJsonMessage jsonMessage = new ResourceModifiedJsonMessage(message);
myStandaloneSubscriptionMessageHandler.handleMessage(jsonMessage);
Mockito.verify(mySubscriptionRegistry, never()).registerSubscriptionUnlessAlreadyRegistered(any());
Mockito.verify(mySubscriptionMatchingSubscriber).matchActiveSubscriptionsAndDeliver(any());
}
} }