@Test public void notifcationServiceCanOnlyHandleVictorOpsSubscription() { assertThat(service.canHandle(SubscriptionType.VICTOROPS), is(true)); for (SubscriptionType type : SubscriptionType.values()) { if (type == SubscriptionType.VICTOROPS) { continue; } assertThat(service.canHandle(type), is(false)); } }
@Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.VICTOROPS; }
VictorOpsNotificationService implements NotificationService { @Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.VICTOROPS; } }
VictorOpsNotificationService implements NotificationService { @Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.VICTOROPS; } @Inject  VictorOpsNotificationService(SeyrenConfig seyrenConfig); }
VictorOpsNotificationService implements NotificationService { @Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.VICTOROPS; } @Inject  VictorOpsNotificationService(SeyrenConfig seyrenConfig); @Override void sendNotification(Check check, Subscription subscription, List<Alert> alerts); @Override boolean canHandle(SubscriptionType subscriptionType); }
VictorOpsNotificationService implements NotificationService { @Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.VICTOROPS; } @Inject  VictorOpsNotificationService(SeyrenConfig seyrenConfig); @Override void sendNotification(Check check, Subscription subscription, List<Alert> alerts); @Override boolean canHandle(SubscriptionType subscriptionType);  }