@Test public void testShowWarningMessage() { final String expectedStrongMessage = "*message*"; final String expectedRegularMessage = "message"; warningContainer.classList = mock(DOMTokenList.class); view.showWarningMessage(expectedStrongMessage, expectedRegularMessage); final String actualStrongMessage = strongWarningMessage.textContent; final String actualRegularMessage = regularWarningMessage.textContent; verify(warningContainer.classList).add(OPENED_CONTAINER_CSS_CLASS); assertEquals(expectedStrongMessage, actualStrongMessage); assertEquals(expectedRegularMessage, actualRegularMessage); }
@Override public void showWarningMessage(final String strongMessage, final String regularMessage) { show(warningContainer); strongWarningMessage.textContent = strongMessage; regularWarningMessage.textContent = regularMessage; }
FlashMessagesView implements FlashMessages.View { @Override public void showWarningMessage(final String strongMessage, final String regularMessage) { show(warningContainer); strongWarningMessage.textContent = strongMessage; regularWarningMessage.textContent = regularMessage; } }
FlashMessagesView implements FlashMessages.View { @Override public void showWarningMessage(final String strongMessage, final String regularMessage) { show(warningContainer); strongWarningMessage.textContent = strongMessage; regularWarningMessage.textContent = regularMessage; } @Inject  FlashMessagesView(final HTMLDivElement errorContainer,
                             final HTMLDivElement warningContainer,
                             final @Named("strong") HTMLElement strongErrorMessage,
                             final @Named("span") HTMLElement regularErrorMessage,
                             final @Named("strong") HTMLElement strongWarningMessage,
                             final @Named("span") HTMLElement regularWarningMessage,
                             final HTMLButtonElement okWarningButton,
                             final HTMLButtonElement cancelWarningButton,
                             final HTMLButtonElement closeSuccessButton,
                             final HTMLDivElement successContainer,
                             final @Named("strong") HTMLElement strongSuccessMessage,
                             final @Named("span") HTMLElement regularSuccessMessage); }
FlashMessagesView implements FlashMessages.View { @Override public void showWarningMessage(final String strongMessage, final String regularMessage) { show(warningContainer); strongWarningMessage.textContent = strongMessage; regularWarningMessage.textContent = regularMessage; } @Inject  FlashMessagesView(final HTMLDivElement errorContainer,
                             final HTMLDivElement warningContainer,
                             final @Named("strong") HTMLElement strongErrorMessage,
                             final @Named("span") HTMLElement regularErrorMessage,
                             final @Named("strong") HTMLElement strongWarningMessage,
                             final @Named("span") HTMLElement regularWarningMessage,
                             final HTMLButtonElement okWarningButton,
                             final HTMLButtonElement cancelWarningButton,
                             final HTMLButtonElement closeSuccessButton,
                             final HTMLDivElement successContainer,
                             final @Named("strong") HTMLElement strongSuccessMessage,
                             final @Named("span") HTMLElement regularSuccessMessage); @Override void init(final FlashMessages presenter); @EventHandler("close-success-message-button") void onCloseSuccessButtonClick(final ClickEvent e); @EventHandler("ok-warning-button") void onOkWarningButtonClick(final ClickEvent e); @EventHandler("cancel-warning-button") void onCancelWarningButtonClick(final ClickEvent e); @Override void showErrorMessage(final String strongMessage,
                                 final String regularMessage); @Override void showWarningMessage(final String strongMessage,
                                   final String regularMessage); @Override void showSuccessMessage(final String strongMessage,
                                   final String regularMessage); @Override void showErrorHighlight(final String errorElementSelector); @Override void showWarningHighlight(final String warningElementSelector); @Override boolean isElementPresent(final String elementSelector); @Override void hideWarningContainer(); @Override void hideSuccessContainer(); @Override void hideErrorContainer(); }
FlashMessagesView implements FlashMessages.View { @Override public void showWarningMessage(final String strongMessage, final String regularMessage) { show(warningContainer); strongWarningMessage.textContent = strongMessage; regularWarningMessage.textContent = regularMessage; } @Inject  FlashMessagesView(final HTMLDivElement errorContainer,
                             final HTMLDivElement warningContainer,
                             final @Named("strong") HTMLElement strongErrorMessage,
                             final @Named("span") HTMLElement regularErrorMessage,
                             final @Named("strong") HTMLElement strongWarningMessage,
                             final @Named("span") HTMLElement regularWarningMessage,
                             final HTMLButtonElement okWarningButton,
                             final HTMLButtonElement cancelWarningButton,
                             final HTMLButtonElement closeSuccessButton,
                             final HTMLDivElement successContainer,
                             final @Named("strong") HTMLElement strongSuccessMessage,
                             final @Named("span") HTMLElement regularSuccessMessage); @Override void init(final FlashMessages presenter); @EventHandler("close-success-message-button") void onCloseSuccessButtonClick(final ClickEvent e); @EventHandler("ok-warning-button") void onOkWarningButtonClick(final ClickEvent e); @EventHandler("cancel-warning-button") void onCancelWarningButtonClick(final ClickEvent e); @Override void showErrorMessage(final String strongMessage,
                                 final String regularMessage); @Override void showWarningMessage(final String strongMessage,
                                   final String regularMessage); @Override void showSuccessMessage(final String strongMessage,
                                   final String regularMessage); @Override void showErrorHighlight(final String errorElementSelector); @Override void showWarningHighlight(final String warningElementSelector); @Override boolean isElementPresent(final String elementSelector); @Override void hideWarningContainer(); @Override void hideSuccessContainer(); @Override void hideErrorContainer();  }