@Test public void testSaveWithCommand() throws Exception { when(toggleCommentPresenter.getComment()).thenReturn("test"); presenter.show(command); presenter.save(); verify(command).execute("test"); verify(view).hide(); }
@PostConstruct public void setup() { view.init(this); }
@Test public void testShowWithAPathThatIsVersioned() throws Exception { final Path versionedPath = getVersionedPath(); presenter.show(versionedPath, command); verify(view).show(); verifyNoMoreInteractions(saveInProgressEvent); }
@PostConstruct public void setup() { view.init(this); }
public void show(final ParameterizedCommand<String> command) { this.command = command; view.show(); }
public void cancel() { view.hide(); }
@Test public void testSetup() throws Exception { presenter.setup(); verify(view).init(presenter); }
public void cancel() { view.hide(); }
@Test public void cancel() throws Exception { presenter.cancel(); verify(view).hide(); } }
@Test public void testShowWithoutPath() throws Exception { presenter.show(command); verify(view).show(); assertEquals(command, presenter.getCommand()); }
@Test public void testSetup() throws Exception { presenter.setup(); verify(view).init(presenter); }
@Test public void testShowWithoutPath() throws Exception { presenter.show(command); verify(view).show(); assertEquals(command, presenter.getCommand()); }
@Test public void cancel() throws Exception { presenter.cancel(); verify(view).hide(); } }
public void show(final ParameterizedCommand<String> command) { this.command = command; view.show(); }
public void save() { checkNotNull("command", command); command.execute(toggleCommentPresenter.getComment()); view.hide(); }
@Test public void testShowWithAPathThatIsVersioned() throws Exception { final Path versionedPath = getVersionedPath(); presenter.show(versionedPath, command); verify(view).show(); verifyNoMoreInteractions(saveInProgressEvent); }
public void save() { checkNotNull("command", command); command.execute(toggleCommentPresenter.getComment()); view.hide(); }
@Test public void testSaveWithCommand() throws Exception { when(toggleCommentPresenter.getComment()).thenReturn("test"); presenter.show(command); presenter.save(); verify(command).execute("test"); verify(view).hide(); }