Last active
July 5, 2017 11:44
-
-
Save tommysitu/5c43efe8e716527da727de78730c466f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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