@Test public void testSetup() { final Message message = mock( Message.class ); presenter.setup( Arrays.asList( message ) ); verify( notificationPresenter ).setup( message ); verify(view).clear(); verify( view ).addNotification( notificationPresenter.getView() ); }
public void setup(final Collection<Message> messages) { checkNotNull("messages", messages); view.clear(); if (messages.isEmpty()) { view.addNotification(setupNotification(null).getView()); } else { for (final Message message : messages) { view.addNotification(setupNotification(message).getView()); } } }
BodyPresenter { public void setup(final Collection<Message> messages) { checkNotNull("messages", messages); view.clear(); if (messages.isEmpty()) { view.addNotification(setupNotification(null).getView()); } else { for (final Message message : messages) { view.addNotification(setupNotification(message).getView()); } } } }
BodyPresenter { public void setup(final Collection<Message> messages) { checkNotNull("messages", messages); view.clear(); if (messages.isEmpty()) { view.addNotification(setupNotification(null).getView()); } else { for (final Message message : messages) { view.addNotification(setupNotification(message).getView()); } } } @Inject  BodyPresenter(final View view,
                         final ManagedInstance<NotificationPresenter> presenterProvider); }
BodyPresenter { public void setup(final Collection<Message> messages) { checkNotNull("messages", messages); view.clear(); if (messages.isEmpty()) { view.addNotification(setupNotification(null).getView()); } else { for (final Message message : messages) { view.addNotification(setupNotification(message).getView()); } } } @Inject  BodyPresenter(final View view,
                         final ManagedInstance<NotificationPresenter> presenterProvider); @PostConstruct void init(); View getView(); void setup(final Collection<Message> messages); }
BodyPresenter { public void setup(final Collection<Message> messages) { checkNotNull("messages", messages); view.clear(); if (messages.isEmpty()) { view.addNotification(setupNotification(null).getView()); } else { for (final Message message : messages) { view.addNotification(setupNotification(message).getView()); } } } @Inject  BodyPresenter(final View view,
                         final ManagedInstance<NotificationPresenter> presenterProvider); @PostConstruct void init(); View getView(); void setup(final Collection<Message> messages);  }