Created
March 22, 2020 07:05
-
-
Save ashkrit/b4bec444d28e3d760a6e39339149435d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 transfer_sgd_to_inr() { | |
FXService fxService = new FXService(currencyConverter, bankService, 0.0d); | |
BankAccount account = new BankAccount("1111-22222", "SuperStableBank"); | |
expect(currencyConverter.convert(1, "SGD", "INR")).andReturn(50d); | |
expect(bankService.deposit(100d, account)).andReturn("99999"); | |
replay(currencyConverter, bankService); | |
String id = fxService.transfer(new Money(SGD, 2d), account, INR); | |
assertEquals("99999", id); | |
verify(currencyConverter, bankService); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment