@Test public void deleteSubscription() { when(subscriptionDelegateTestObject.subscriptionDao.getSubscription(subscriber, publisher)).thenReturn(subscription); subscriptionDelegateTestObject.deleteSubscription(subscriptionContext); verify(subscriptionDelegateTestObject.subscriptionDao).deleteSubscription(subscription); }
public void deleteSubscription(NotificationSubscriptionContext subscriptionContext) { Publisher publisher = getPublisher(subscriptionContext); Subscriber subscriber = getSubscriber(subscriptionContext.getIdentity()); Subscription subscription = subscriptionDao.getSubscription(subscriber, publisher); subscriptionDao.deleteSubscription(subscription); }
SubscriptionDelegate { public void deleteSubscription(NotificationSubscriptionContext subscriptionContext) { Publisher publisher = getPublisher(subscriptionContext); Subscriber subscriber = getSubscriber(subscriptionContext.getIdentity()); Subscription subscription = subscriptionDao.getSubscription(subscriber, publisher); subscriptionDao.deleteSubscription(subscription); } }
SubscriptionDelegate { public void deleteSubscription(NotificationSubscriptionContext subscriptionContext) { Publisher publisher = getPublisher(subscriptionContext); Subscriber subscriber = getSubscriber(subscriptionContext.getIdentity()); Subscription subscription = subscriptionDao.getSubscription(subscriber, publisher); subscriptionDao.deleteSubscription(subscription); }  }
SubscriptionDelegate { public void deleteSubscription(NotificationSubscriptionContext subscriptionContext) { Publisher publisher = getPublisher(subscriptionContext); Subscriber subscriber = getSubscriber(subscriptionContext.getIdentity()); Subscription subscription = subscriptionDao.getSubscription(subscriber, publisher); subscriptionDao.deleteSubscription(subscription); }  void deleteSubscription(NotificationSubscriptionContext subscriptionContext); void invalidateSubscriptionForSubscriptionContext(NotificationSubscriptionContext subscriptionContext); void invalidateSubscription(Publisher publisher, Subscriber subscriber); void invalidateSubscription(Subscription subscription); Subscription getSubscription(NotificationSubscriptionContext subscriptionContext); Subscription createAndSaveSubscription(NotificationSubscriptionContext subscriptionContext); List<Subscription> getSubscriptions(Identity identity); }
SubscriptionDelegate { public void deleteSubscription(NotificationSubscriptionContext subscriptionContext) { Publisher publisher = getPublisher(subscriptionContext); Subscriber subscriber = getSubscriber(subscriptionContext.getIdentity()); Subscription subscription = subscriptionDao.getSubscription(subscriber, publisher); subscriptionDao.deleteSubscription(subscription); }  void deleteSubscription(NotificationSubscriptionContext subscriptionContext); void invalidateSubscriptionForSubscriptionContext(NotificationSubscriptionContext subscriptionContext); void invalidateSubscription(Publisher publisher, Subscriber subscriber); void invalidateSubscription(Subscription subscription); Subscription getSubscription(NotificationSubscriptionContext subscriptionContext); Subscription createAndSaveSubscription(NotificationSubscriptionContext subscriptionContext); List<Subscription> getSubscriptions(Identity identity);  }