Skip to content

Instantly share code, notes, and snippets.

@tommysitu
Last active July 5, 2017 11:44
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 tommysitu/5c43efe8e716527da727de78730c466f to your computer and use it in GitHub Desktop.
Save tommysitu/5c43efe8e716527da727de78730c466f to your computer and use it in GitHub Desktop.
@Test
public void shouldUpgradeAccountIfPaymentIsSuccessful() throws Exception {
when(paymentService.process(new Charge("id", 20000, GBP)))
.thenReturn(new ChargeStatus(SUCCESSFUL));
serviceUnderTest.upgrade("id");
verify(accountService).update(eq("id"), eq(PREMIUM));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment