ConfirmBox { public void show(final String title, final String message, final org.uberfire.mvp.Command yesCommand) { view.show(title, message, yesCommand); } @Inject  ConfirmBox(final View view); void show(final String title,
                     final String message,
                     final org.uberfire.mvp.Command yesCommand); void show(final String title,
                     final String message,
                     final org.uberfire.mvp.Command yesCommand,
                     Command noCancelCommand); void show(final String title,
                     final String message,
                     final org.uberfire.mvp.Command yesCommand,
                     final org.uberfire.mvp.Command noCommand,
                     final org.uberfire.mvp.Command cancelCommand);  }
@Test public void testYesCommand() throws Exception { final String title = "title"; final String message = "message"; final Command yesCommand = mock(Command.class); presenter.show(title, message, yesCommand); verify(view, times(1)).show(title, message, yesCommand); }
@Test public void testNoCommands() throws Exception { final String title = "title"; final String message = "message"; final Command yesCommand = mock(Command.class); final Command noCommand = mock(Command.class); presenter.show(title, message, yesCommand, noCommand); verify(view, times(1)).show(title, message, yesCommand, noCommand); }
@Test public void testNoCancelCommands() throws Exception { final String title = "title"; final String message = "message"; final Command yesCommand = mock(Command.class); final Command noCommand = mock(Command.class); final Command cancelCommand = mock(Command.class); presenter.show(title, message, yesCommand, noCommand, cancelCommand); verify(view, times(1)).show(title, message, yesCommand, noCommand, cancelCommand); }
@Test public void testAllCommands() throws Exception { final String title = "title"; final String message = "message"; final Command yesCommand = mock(Command.class); final Command noCommand = mock(Command.class); final Command cancelCommand = mock(Command.class); presenter.show(title, message, yesCommand, noCommand, cancelCommand); verify(view, times(1)).show(title, message, yesCommand, noCommand, cancelCommand); }