Skip to content

Commit

Permalink
fix: unit test reset driver rating
Browse files Browse the repository at this point in the history
  • Loading branch information
Baaarbz committed Dec 15, 2024
1 parent c6fd64f commit 431242b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ class ReprocessEloUseCaseShould {
assertThat(response).isInstanceOf(ReprocessEloSuccess::class)
verifyOrder {
driverRepository.findAll()
driverRepository.save(hamilton)
driverRepository.save(verstappen)
driverRepository.save(any())
seasonRepository.findAllSeasonsYears()
calculateEloOfDriversBySeasonUseCase(CalculateEloOfDriversBySeasonRequest(2017))
calculateEloOfDriversBySeasonUseCase(CalculateEloOfDriversBySeasonRequest(2018))
Expand All @@ -64,8 +63,7 @@ class ReprocessEloUseCaseShould {
assertThrows<EloReprocessingFailedException> { useCase() }
verify {
driverRepository.findAll()
driverRepository.save(hamilton)
driverRepository.save(verstappen)
driverRepository.save(any())
seasonRepository.findAllSeasonsYears()
calculateEloOfDriversBySeasonUseCase(any())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ class ReprocessIRatingUseCaseShould {
assertThat(response).isInstanceOf(ReprocessIRatingSuccess::class)
verifyOrder {
driverRepository.findAll()
driverRepository.save(hamilton)
driverRepository.save(verstappen)
driverRepository.save(any())
seasonRepository.findAllSeasonsYears()
calculateIRatingOfDriversBySeasonUseCase(CalculateIRatingOfDriversBySeasonRequest(2017))
calculateIRatingOfDriversBySeasonUseCase(CalculateIRatingOfDriversBySeasonRequest(2018))
Expand All @@ -65,8 +64,7 @@ class ReprocessIRatingUseCaseShould {
assertThrows<IRatingReprocessingFailedException> { useCase() }
verify {
driverRepository.findAll()
driverRepository.save(hamilton)
driverRepository.save(verstappen)
driverRepository.save(any())
seasonRepository.findAllSeasonsYears()
calculateIRatingOfDriversBySeasonUseCase(any())
}
Expand Down

0 comments on commit 431242b

Please sign in to comment.