Ejemplo n.º 1
0
  private CategoryDataset buildDataSet(Map<LocalDate, TestResultSummary> summaries) {
    DataSetBuilder<String, LocalDateLabel> dsb = new DataSetBuilder<String, LocalDateLabel>();

    for (Map.Entry<LocalDate, TestResultSummary> entry : summaries.entrySet()) {
      LocalDateLabel label = new LocalDateLabel(entry.getKey());

      switch (getDisplayStatusEnum()) {
        case SUCCESS:
          dsb.add(entry.getValue().getSuccess(), Messages.Dashboard_Total(), label);
          break;
        case SKIPPED:
          dsb.add(entry.getValue().getSkipped(), Messages.Dashboard_Skipped(), label);
          break;
        case FAILED:
          dsb.add(entry.getValue().getFailed(), Messages.Dashboard_Failed(), label);
          break;
        default:
          dsb.add(entry.getValue().getSuccess(), Messages.Dashboard_Total(), label);
          dsb.add(entry.getValue().getFailed(), Messages.Dashboard_Failed(), label);
          dsb.add(entry.getValue().getSkipped(), Messages.Dashboard_Skipped(), label);
      }
    }
    return dsb.build();
  }
Ejemplo n.º 2
0
 @Override
 public String getDisplayName() {
   return Messages.Dashboard_TestTrendChart();
 }