Bank requirements - wojtekPi/TDD-training2 GitHub Wiki

PaymentService: method transferMoney(Account from, Account to, int howMuch) Acceptance criteria

  1. transfer Money from first to second account
  2. should throw IllegalArgumentException when not enough money on account (less than -500) 2a. Exception should contain text: "I'm very sorry, but you don't have enough money..."

Next improvements:

  1. I want to have different Currencies (on account and in transfer money method) transferMoney(Account,Account,Instrument)
  2. Should throw IllegalArgumentException when incorrect currencies

Next Requirements:

  1. Should be possible to transfer money:
  • from account in currency A
  • moneyToTransfer defined in currency A
  • to account in any currency Exchange service should be called to provide proper amounts.
  1. When exchange service not set and payment is in different currencies, then NullPointerException should be thrown.

Next Requirements:

  1. Should be possible to transfer money:
  • from account in currency A
  • moneyToTransfer defined in currency B
  • to account in any currency (C) Exchange service should be called to provide proper amounts.