@Test public void testCopyError() { when( view.getNewTemplateName() ).thenReturn( "" ); presenter.save(); verify( view ).errorOnTemplateNameFromGroup(); }
public void save() { if (view.getNewTemplateName().trim().isEmpty()) { view.errorOnTemplateNameFromGroup(); return; } command.execute(view.getNewTemplateName()); }
CopyPopupPresenter { public void save() { if (view.getNewTemplateName().trim().isEmpty()) { view.errorOnTemplateNameFromGroup(); return; } command.execute(view.getNewTemplateName()); } }
CopyPopupPresenter { public void save() { if (view.getNewTemplateName().trim().isEmpty()) { view.errorOnTemplateNameFromGroup(); return; } command.execute(view.getNewTemplateName()); } @Inject  CopyPopupPresenter(final View view); }
CopyPopupPresenter { public void save() { if (view.getNewTemplateName().trim().isEmpty()) { view.errorOnTemplateNameFromGroup(); return; } command.execute(view.getNewTemplateName()); } @Inject  CopyPopupPresenter(final View view); @PostConstruct void init(); View getView(); void copy(final ParameterizedCommand<String> command); void errorDuringProcessing(final String message); void save(); void hide(); }
CopyPopupPresenter { public void save() { if (view.getNewTemplateName().trim().isEmpty()) { view.errorOnTemplateNameFromGroup(); return; } command.execute(view.getNewTemplateName()); } @Inject  CopyPopupPresenter(final View view); @PostConstruct void init(); View getView(); void copy(final ParameterizedCommand<String> command); void errorDuringProcessing(final String message); void save(); void hide();  }