Skip to content

Deposit money into an account #2

@huangweili97

Description

@huangweili97

As an existing bank customer with an account, I want to deposit money into my account, so that I can safely store my funds in the bank.

Acceptance Criteria
Scenario 1: Successful deposit
Given the user has an active bank account,
When they provide the correct account ID and deposit a valid positive amount,
Then the balance of the account is increased by the deposited amount.

Scenario 2: Unsuccessful deposit due to invalid account ID
Given the user provides an invalid or non-existent account ID,
When they attempt to deposit money,
Then the system does not process the deposit and an error message is displayed.

Scenario 3: Unsuccessful deposit due to invalid amount
Given the user has an active bank account,
When they attempt to deposit a zero or negative amount,
Then the system does not process the deposit and an error message is displayed.

Tasks
Add a method for depositing money into an account in the Bank class.
Ensure the method validates the account ID and amount before updating the balance.
Create unit tests to verify all acceptance criteria.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions