Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgryszko/9f78d3b29e084c2a35f77daed6e88099 to your computer and use it in GitHub Desktop.
Save mgryszko/9f78d3b29e084c2a35f77daed6e88099 to your computer and use it in GitHub Desktop.
ScoreCleaner cleaner = action -> action.run(); // or Runnable::run
@Test
void delete() {
var profile = ScoringProfile.builder().id(profileId).build();
when(versioner.nextVersion(profile)).thenReturn(version);
when(persisterSupplier.getPersister(profileId, version)).thenReturn(persister);
recalculateService.calculateAndPersist(profile);
var inOrder = inOrder(calculator, versioner);
inOrder.verify(calculator).calculateScores(profile, persister);
inOrder.verify(versioner).calculationFinished(version);
inOrder.verify(versioner).activateVersion(profile, version);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment