@Test public void getSlackNotificationColor () { assertEquals("danger", slackNotifications.getSlackNotificationColor(NotificationLevel.ERROR)); assertEquals("warning", slackNotifications.getSlackNotificationColor(NotificationLevel.WARN)); assertEquals("good", slackNotifications.getSlackNotificationColor(NotificationLevel.GOOD)); }
String getSlackNotificationColor (NotificationLevel notificationLevel) { return Optional.ofNullable(slackNotificationColorMap.get(notificationLevel)).orElse("danger"); }
SlackNotifications extends BufferedNotificationMethod { String getSlackNotificationColor (NotificationLevel notificationLevel) { return Optional.ofNullable(slackNotificationColorMap.get(notificationLevel)).orElse("danger"); } }
SlackNotifications extends BufferedNotificationMethod { String getSlackNotificationColor (NotificationLevel notificationLevel) { return Optional.ofNullable(slackNotificationColorMap.get(notificationLevel)).orElse("danger"); } @Autowired  SlackNotifications(@Value("${slack_webhookuri}") @NotNull String webhookUri); }
SlackNotifications extends BufferedNotificationMethod { String getSlackNotificationColor (NotificationLevel notificationLevel) { return Optional.ofNullable(slackNotificationColorMap.get(notificationLevel)).orElse("danger"); } @Autowired  SlackNotifications(@Value("${slack_webhookuri}") @NotNull String webhookUri); @Override void logNotification(ChaosNotification notification); }
SlackNotifications extends BufferedNotificationMethod { String getSlackNotificationColor (NotificationLevel notificationLevel) { return Optional.ofNullable(slackNotificationColorMap.get(notificationLevel)).orElse("danger"); } @Autowired  SlackNotifications(@Value("${slack_webhookuri}") @NotNull String webhookUri); @Override void logNotification(ChaosNotification notification);  }