package ex06; import static org.junit.Assert.*; import org.junit.Test; import common.Money; import common.TransferService; public class TransferServiceTest { @Test public void transferWithCurrencyConversion() { TestableBankService bankService = new TestableBankService(); bankService.setSufficientFunds(true); TransferService transferService = new TransferService(bankService); transferService.transfer(new Money(15, "EEK"), "123", "456"); assertTrue(bankService.wasCreditCalledWith(new Money(15, "EEK"), "123")); assertFalse(bankService.wasCreditCalledWith(new Money(0, "EEK"), "")); assertTrue(bankService.wasDebitCalledWith(new Money(1, "EUR"), "456")); //assertFalse(bankService.wasDebitCalledWith(new Money(0, "EUR"), "")); } }