Feature: A user cancels the deposit

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.

Scenario: Calculate the amount to be transferred after the cancellation

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

Business rules:

<-- Note: This example has been marked as EXPECTED_TO_FAIL

One receives the same amount as deposited if the deposit cancelled during the first half

For 1 year long deposit with 100 initial amount and 2% interest rate, when I cancel it after MONTHS and DAYS:

MONTHSDAYSTRANSFERRED
07100 TO BE IMPLEMENTED
60100 TO BE IMPLEMENTED

<-- Note: This example has been marked as EXPECTED_TO_FAIL

One receives the deposited amount plus half of the interest if the deposit cancelled after 6 months and within the first year

For 1 year long deposit with 100 initial amount and 2% interest rate, when I cancel it after MONTHS and DAYS:

MONTHSDAYSTRANSFERRED
61101 TO BE IMPLEMENTED
120101 TO BE IMPLEMENTED

<-- Note: This example has been marked as EXPECTED_TO_FAIL

The deposit is automatically renewed if not cancelled

For 1 year long deposit with 100 initial amount and 2% interest rate, when I cancel it after MONTHS and DAYS:

MONTHSDAYSTRANSFERRED
121102 TO BE IMPLEMENTED
180102 TO BE IMPLEMENTED
181103 TO BE IMPLEMENTED
241104 TO BE IMPLEMENTED

<-- Note: This example has been marked as EXPECTED_TO_FAIL

One cannot cancel the deposit before 7th day

For 1 year long deposit with 100 initial amount and 2% interest rate, when I cancel it after MONTHS and DAYS:

MONTHSDAYSTRANSFERRED
00X TO BE IMPLEMENTED
06X TO BE IMPLEMENTED