@Test public void taskSelectionEventIsForLogTask() { String serverTemplateId = "serverTemplateId"; String containerId = "containerId"; Long taskId = 1L; boolean isForLog = true; TaskSelectionEvent event = new TaskSelectionEvent(serverTemplateId, containerId, taskId, "task", true, isForLog); TaskAssignmentSummary ts = new TaskAssignmentSummary(); ts.setPotOwnersString(Arrays.asList("owner1", "owner2")); when(taskService.getTaskAssignmentDetails(eq(serverTemplateId), eq(containerId), eq(taskId))).thenReturn(ts); presenter.onTaskSelectionEvent(event); verifyNoMoreInteractions(taskService); }
public void onTaskSelectionEvent(@Observes final TaskSelectionEvent event) { if (!event.isForLog()) { setSelectedTask(event); view.setHelpText(""); view.clearUserOrGroupInput(); refreshTaskPotentialOwners(); } }
TaskAssignmentsPresenter extends AbstractTaskPresenter { public void onTaskSelectionEvent(@Observes final TaskSelectionEvent event) { if (!event.isForLog()) { setSelectedTask(event); view.setHelpText(""); view.clearUserOrGroupInput(); refreshTaskPotentialOwners(); } } }
TaskAssignmentsPresenter extends AbstractTaskPresenter { public void onTaskSelectionEvent(@Observes final TaskSelectionEvent event) { if (!event.isForLog()) { setSelectedTask(event); view.setHelpText(""); view.clearUserOrGroupInput(); refreshTaskPotentialOwners(); } } @Inject  TaskAssignmentsPresenter(TaskAssignmentsView view,
                                    Caller<TaskService> taskService,
                                    Event<TaskRefreshedEvent> taskRefreshed); }
TaskAssignmentsPresenter extends AbstractTaskPresenter { public void onTaskSelectionEvent(@Observes final TaskSelectionEvent event) { if (!event.isForLog()) { setSelectedTask(event); view.setHelpText(""); view.clearUserOrGroupInput(); refreshTaskPotentialOwners(); } } @Inject  TaskAssignmentsPresenter(TaskAssignmentsView view,
                                    Caller<TaskService> taskService,
                                    Event<TaskRefreshedEvent> taskRefreshed); @PostConstruct void init(); IsWidget getView(); void delegateTask(String entity); void refreshTaskPotentialOwners(); void onTaskSelectionEvent(@Observes final TaskSelectionEvent event); void onTaskRefreshedEvent(@Observes final TaskRefreshedEvent event); }
TaskAssignmentsPresenter extends AbstractTaskPresenter { public void onTaskSelectionEvent(@Observes final TaskSelectionEvent event) { if (!event.isForLog()) { setSelectedTask(event); view.setHelpText(""); view.clearUserOrGroupInput(); refreshTaskPotentialOwners(); } } @Inject  TaskAssignmentsPresenter(TaskAssignmentsView view,
                                    Caller<TaskService> taskService,
                                    Event<TaskRefreshedEvent> taskRefreshed); @PostConstruct void init(); IsWidget getView(); void delegateTask(String entity); void refreshTaskPotentialOwners(); void onTaskSelectionEvent(@Observes final TaskSelectionEvent event); void onTaskRefreshedEvent(@Observes final TaskRefreshedEvent event);  }