@Test public void mapLevelToColor () { assertEquals(XMPPNotification.ParagraphStyle.NOTIFICATION_MESSAGE_ERROR, xmppNotification.mapLevelToStyle(NotificationLevel.ERROR)); assertEquals(XMPPNotification.ParagraphStyle.NOTIFICATION_MESSAGE_WARN, xmppNotification.mapLevelToStyle(NotificationLevel.WARN)); assertEquals(XMPPNotification.ParagraphStyle.NOTIFICATION_MESSAGE_GOOD, xmppNotification.mapLevelToStyle(NotificationLevel.GOOD)); }
ParagraphStyle mapLevelToStyle (NotificationLevel level) { switch (level) { case WARN: return ParagraphStyle.NOTIFICATION_MESSAGE_WARN; case ERROR: return ParagraphStyle.NOTIFICATION_MESSAGE_ERROR; default: return ParagraphStyle.NOTIFICATION_MESSAGE_GOOD; } }
XMPPNotification implements NotificationMethods { ParagraphStyle mapLevelToStyle (NotificationLevel level) { switch (level) { case WARN: return ParagraphStyle.NOTIFICATION_MESSAGE_WARN; case ERROR: return ParagraphStyle.NOTIFICATION_MESSAGE_ERROR; default: return ParagraphStyle.NOTIFICATION_MESSAGE_GOOD; } } }
XMPPNotification implements NotificationMethods { ParagraphStyle mapLevelToStyle (NotificationLevel level) { switch (level) { case WARN: return ParagraphStyle.NOTIFICATION_MESSAGE_WARN; case ERROR: return ParagraphStyle.NOTIFICATION_MESSAGE_ERROR; default: return ParagraphStyle.NOTIFICATION_MESSAGE_GOOD; } } @Autowired  XMPPNotification(); }
XMPPNotification implements NotificationMethods { ParagraphStyle mapLevelToStyle (NotificationLevel level) { switch (level) { case WARN: return ParagraphStyle.NOTIFICATION_MESSAGE_WARN; case ERROR: return ParagraphStyle.NOTIFICATION_MESSAGE_ERROR; default: return ParagraphStyle.NOTIFICATION_MESSAGE_GOOD; } } @Autowired  XMPPNotification(); @Override void logNotification(ChaosNotification notification); }
XMPPNotification implements NotificationMethods { ParagraphStyle mapLevelToStyle (NotificationLevel level) { switch (level) { case WARN: return ParagraphStyle.NOTIFICATION_MESSAGE_WARN; case ERROR: return ParagraphStyle.NOTIFICATION_MESSAGE_ERROR; default: return ParagraphStyle.NOTIFICATION_MESSAGE_GOOD; } } @Autowired  XMPPNotification(); @Override void logNotification(ChaosNotification notification);  }