@Test public void testNoIssuesShowNothing() throws Exception { screen.showReport(getAnalysis()); verify(view, never()).showIssue(any(Issue.class)); verify(view).clearIssue(); verify(issueSelectedEvent, times(1)).fire(issueSelectedEventCaptor.capture()); assertEquals(Issue.EMPTY, issueSelectedEventCaptor.getValue().getIssue()); }
public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject  AnalysisReportScreen(final AnalysisReportScreenView view,
                                final Event<IssueSelectedEvent> issueSelectedEvent); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject  AnalysisReportScreen(final AnalysisReportScreenView view,
                                final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status); }
AnalysisReportScreen implements IsWidget { public void showReport(final AnalysisReport report) { LOGGER.finest("Received report for: " + report.getPlace().getPath()); if (!report.getPlace().equals(currentPlace)) { return; } view.showStatusComplete(); final List<Issue> issues = getIssues(report); final boolean isIllegalState = issues.stream() .filter(issue -> Objects.equals(issue.getCheckType(), CheckType.ILLEGAL_VERIFIER_STATE)) .count() > 0; if (isIllegalState) { view.hideProgressStatus(); } dataProvider.setList(issues); if (dataProvider.getList().isEmpty()) { fireIssueSelectedEvent(Issue.EMPTY); view.clearIssue(); } else { final Issue issue = dataProvider.getList().get(0); onSelect(issue); } } AnalysisReportScreen(); @Inject  AnalysisReportScreen(final AnalysisReportScreenView view,
                                final Event<IssueSelectedEvent> issueSelectedEvent); void showReport(final AnalysisReport report); void setCurrentPlace(final PlaceRequest place); @Override Widget asWidget(); void onSelect(final Issue issue); void showStatus(final Status status);  }