@Test void testComputeSeries() { int newSize = 3; int fixedSize = 5; StaticAnalysisRun run = mock(StaticAnalysisRun.class); when(run.getNewSize()).thenReturn(newSize); when(run.getFixedSize()).thenReturn(fixedSize); NewVersusFixedSeriesBuilder builder = new NewVersusFixedSeriesBuilder(); Map<String, Integer> series = builder.computeSeries(run); assertThat(series.size()).isEqualTo(2); assertThat(series.get(NewVersusFixedSeriesBuilder.NEW)).isEqualTo(newSize); assertThat(series.get(NewVersusFixedSeriesBuilder.FIXED)).isEqualTo(fixedSize); }
@Override protected Map<String, Integer> computeSeries(final AnalysisBuildResult current) { Map<String, Integer> series = new HashMap<>(); series.put(NEW, current.getNewSize()); series.put(FIXED, current.getFixedSize()); return series; }
NewVersusFixedSeriesBuilder extends SeriesBuilder<AnalysisBuildResult> { @Override protected Map<String, Integer> computeSeries(final AnalysisBuildResult current) { Map<String, Integer> series = new HashMap<>(); series.put(NEW, current.getNewSize()); series.put(FIXED, current.getFixedSize()); return series; } }
NewVersusFixedSeriesBuilder extends SeriesBuilder<AnalysisBuildResult> { @Override protected Map<String, Integer> computeSeries(final AnalysisBuildResult current) { Map<String, Integer> series = new HashMap<>(); series.put(NEW, current.getNewSize()); series.put(FIXED, current.getFixedSize()); return series; }  }
NewVersusFixedSeriesBuilder extends SeriesBuilder<AnalysisBuildResult> { @Override protected Map<String, Integer> computeSeries(final AnalysisBuildResult current) { Map<String, Integer> series = new HashMap<>(); series.put(NEW, current.getNewSize()); series.put(FIXED, current.getFixedSize()); return series; }   }
NewVersusFixedSeriesBuilder extends SeriesBuilder<AnalysisBuildResult> { @Override protected Map<String, Integer> computeSeries(final AnalysisBuildResult current) { Map<String, Integer> series = new HashMap<>(); series.put(NEW, current.getNewSize()); series.put(FIXED, current.getFixedSize()); return series; }    }