As an existing bank customer with an account, I want to check the balance of my account, so that I can know how much money is available.
Acceptance Criteria
Scenario 1: Successful balance check
Given the user has an active bank account,
When they provide the correct account ID,
Then the system returns the current balance of the account.
Scenario 2: Unsuccessful balance check due to invalid account ID
Given the user provides an invalid or non-existent account ID,
When they attempt to check the balance,
Then the system does not provide the balance and an error message is displayed.
Tasks
- Add a method for checking the balance of an account in the Bank class.
- Ensure the method validates the account ID before returning the balance.
- Create unit tests to verify all acceptance criteria.
As an existing bank customer with an account, I want to check the balance of my account, so that I can know how much money is available.
Acceptance Criteria
Scenario 1: Successful balance check
Given the user has an active bank account,
When they provide the correct account ID,
Then the system returns the current balance of the account.
Scenario 2: Unsuccessful balance check due to invalid account ID
Given the user provides an invalid or non-existent account ID,
When they attempt to check the balance,
Then the system does not provide the balance and an error message is displayed.
Tasks