Skip to content

Commit

Permalink
Fix one test
Browse files Browse the repository at this point in the history
  • Loading branch information
PhillipHow committed Dec 3, 2021
1 parent 0c69648 commit 53a6e78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>de.philliphow</groupId>
<artifactId>covidimpfde</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
<packaging>jar</packaging>

<name>de.philliphow.covidimpfde</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,22 +380,24 @@ public void lastWeekIsCorrect() {
public void getLastNWeeklySummariesIsCorrect() {

interpretation = getInterpretationFor(
new VaccinationDataRowMockBuilder().with(DATE, LocalDate.of(2021, 1, 4)).with(SHOTS_TODAY, 100).get(), // shouldnt
new VaccinationDataRowMockBuilder().with(DATE, LocalDate.of(2021, 1, 4)).with(SHOTS_TODAY, 100).with(SHOTS_TODAY_FIRST, 50).get(), // shouldnt
// be
// in
// it
new VaccinationDataRowMockBuilder().with(DATE, LocalDate.of(2021, 1, 11)).with(SHOTS_TODAY, 200).get(),
new VaccinationDataRowMockBuilder().with(DATE, LocalDate.of(2021, 1, 12)).with(SHOTS_TODAY, 300).get(),
new VaccinationDataRowMockBuilder().with(DATE, LocalDate.of(2021, 1, 19)).with(SHOTS_TODAY, 400).get());
new VaccinationDataRowMockBuilder().with(DATE, LocalDate.of(2021, 1, 11)).with(SHOTS_TODAY, 200).with(SHOTS_TODAY_FIRST, 100).get(),
new VaccinationDataRowMockBuilder().with(DATE, LocalDate.of(2021, 1, 12)).with(SHOTS_TODAY, 300).with(SHOTS_TODAY_FIRST, 150).get(),
new VaccinationDataRowMockBuilder().with(DATE, LocalDate.of(2021, 1, 19)).with(SHOTS_TODAY, 400).with(SHOTS_TODAY_FIRST, 200).get());

List<WeeklySummary> summaries = interpretation.getLastNWeeklySummarys(2);

assertEquals(2, summaries.size());

assertEquals(LocalDate.of(2021, 1, 18), summaries.get(0).getWeekdayMonday());
assertEquals(400, summaries.get(0).getTotalDoses());
assertEquals(200, summaries.get(0).getTotalFirstDoses());
assertEquals(LocalDate.of(2021, 1, 11), summaries.get(1).getWeekdayMonday());
assertEquals(200 + 300, summaries.get(1).getTotalDoses());
assertEquals(100 + 150, summaries.get(1).getTotalFirstDoses());

}

Expand Down

0 comments on commit 53a6e78

Please sign in to comment.