@Test public void notifcationServiceCanOnlyHandleSlackSubscription() { assertThat(notificationService.canHandle(SubscriptionType.SLACK), is(true)); for (SubscriptionType type : SubscriptionType.values()) { if (type == SubscriptionType.SLACK) { continue; } assertThat(notificationService.canHandle(type), is(false)); } }
@Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.SLACK; }
SlackNotificationService implements NotificationService { @Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.SLACK; } }
SlackNotificationService implements NotificationService { @Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.SLACK; } @Inject  SlackNotificationService(SeyrenConfig seyrenConfig); protected  SlackNotificationService(SeyrenConfig seyrenConfig, String baseUrl); }
SlackNotificationService implements NotificationService { @Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.SLACK; } @Inject  SlackNotificationService(SeyrenConfig seyrenConfig); protected  SlackNotificationService(SeyrenConfig seyrenConfig, String baseUrl); @Override void sendNotification(Check check, Subscription subscription, List<Alert> alerts); @Override boolean canHandle(SubscriptionType subscriptionType); }
SlackNotificationService implements NotificationService { @Override public boolean canHandle(SubscriptionType subscriptionType) { return subscriptionType == SubscriptionType.SLACK; } @Inject  SlackNotificationService(SeyrenConfig seyrenConfig); protected  SlackNotificationService(SeyrenConfig seyrenConfig, String baseUrl); @Override void sendNotification(Check check, Subscription subscription, List<Alert> alerts); @Override boolean canHandle(SubscriptionType subscriptionType);  }