@Test public void testClearMessages() { final ArgumentCaptor<UnpublishMessagesEvent> eventCaptor = ArgumentCaptor.forClass(UnpublishMessagesEvent.class); projectMessagesListener.clearMessages(mock(AbstractNotification.class)); verify(unpublishMessagesEvent).fire(eventCaptor.capture()); assertEquals(eventCaptor.getValue().getMessageType(), ProjectMessagesListener.MESSAGE_TYPE + PATH); assertEquals(eventCaptor.getValue().isShowSystemConsole(), false); }
protected void clearMessages(AbstractNotification notification) { final UnpublishMessagesEvent unpublishMessagesEvent = new UnpublishMessagesEvent(); unpublishMessagesEvent.setMessageType(getMessageType(getDiagramPath())); unpublishMessagesEvent.setShowSystemConsole(false); this.unpublishMessagesEvent.fire(unpublishMessagesEvent); }
ProjectMessagesListener { protected void clearMessages(AbstractNotification notification) { final UnpublishMessagesEvent unpublishMessagesEvent = new UnpublishMessagesEvent(); unpublishMessagesEvent.setMessageType(getMessageType(getDiagramPath())); unpublishMessagesEvent.setShowSystemConsole(false); this.unpublishMessagesEvent.fire(unpublishMessagesEvent); } }
ProjectMessagesListener { protected void clearMessages(AbstractNotification notification) { final UnpublishMessagesEvent unpublishMessagesEvent = new UnpublishMessagesEvent(); unpublishMessagesEvent.setMessageType(getMessageType(getDiagramPath())); unpublishMessagesEvent.setShowSystemConsole(false); this.unpublishMessagesEvent.fire(unpublishMessagesEvent); } protected  ProjectMessagesListener(); @Inject  ProjectMessagesListener(final NotificationsObserver notificationsObserver,
                                   final Event<PublishMessagesEvent> publishMessagesEvent,
                                   final Event<UnpublishMessagesEvent> unpublishMessagesEvent,
                                   final SessionManager clientSessionManager); }
ProjectMessagesListener { protected void clearMessages(AbstractNotification notification) { final UnpublishMessagesEvent unpublishMessagesEvent = new UnpublishMessagesEvent(); unpublishMessagesEvent.setMessageType(getMessageType(getDiagramPath())); unpublishMessagesEvent.setShowSystemConsole(false); this.unpublishMessagesEvent.fire(unpublishMessagesEvent); } protected  ProjectMessagesListener(); @Inject  ProjectMessagesListener(final NotificationsObserver notificationsObserver,
                                   final Event<PublishMessagesEvent> publishMessagesEvent,
                                   final Event<UnpublishMessagesEvent> unpublishMessagesEvent,
                                   final SessionManager clientSessionManager); void enable(); }
ProjectMessagesListener { protected void clearMessages(AbstractNotification notification) { final UnpublishMessagesEvent unpublishMessagesEvent = new UnpublishMessagesEvent(); unpublishMessagesEvent.setMessageType(getMessageType(getDiagramPath())); unpublishMessagesEvent.setShowSystemConsole(false); this.unpublishMessagesEvent.fire(unpublishMessagesEvent); } protected  ProjectMessagesListener(); @Inject  ProjectMessagesListener(final NotificationsObserver notificationsObserver,
                                   final Event<PublishMessagesEvent> publishMessagesEvent,
                                   final Event<UnpublishMessagesEvent> unpublishMessagesEvent,
                                   final SessionManager clientSessionManager); void enable(); static final String MESSAGE_TYPE; }