A customer is able to cancel the deposit earlier. In such case they will receive the full amount, but the interest may be not as high as it would be if they did not cancel their deposit prematurely.
Given an X year(s) long time deposit
And the initial amount of Y pounds
And the interest rate of Z% a year
When I cancel the deposit after MONTHS months and DAYS days
Then I should have TRANSFERRED pounds transferred to my account
<-- Note: This example has been marked as EXPECTED_TO_FAIL
For 1 year long deposit with 100 initial amount and 2% interest rate, when I cancel it after MONTHS and DAYS:
MONTHS | DAYS | TRANSFERRED | |
---|---|---|---|
0 | 7 | ||
6 | 0 |
<-- Note: This example has been marked as EXPECTED_TO_FAIL
For 1 year long deposit with 100 initial amount and 2% interest rate, when I cancel it after MONTHS and DAYS:
MONTHS | DAYS | TRANSFERRED | |
---|---|---|---|
6 | 1 | ||
12 | 0 |
<-- Note: This example has been marked as EXPECTED_TO_FAIL
For 1 year long deposit with 100 initial amount and 2% interest rate, when I cancel it after MONTHS and DAYS:
MONTHS | DAYS | TRANSFERRED | |
---|---|---|---|
12 | 1 | ||
18 | 0 | ||
18 | 1 | ||
24 | 1 |
<-- Note: This example has been marked as EXPECTED_TO_FAIL
For 1 year long deposit with 100 initial amount and 2% interest rate, when I cancel it after MONTHS and DAYS:
MONTHS | DAYS | TRANSFERRED | |
---|---|---|---|
0 | 0 | ||
0 | 6 |