## 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:

MONTHS | DAYS | TRANSFERRED |
---|

0 | 7 | ~~100~~ TO BE IMPLEMENTED |

6 | 0 | ~~100~~ 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:

MONTHS | DAYS | TRANSFERRED |
---|

6 | 1 | ~~101~~ TO BE IMPLEMENTED |

12 | 0 | ~~101~~ 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:

MONTHS | DAYS | TRANSFERRED |
---|

12 | 1 | ~~102~~ TO BE IMPLEMENTED |

18 | 0 | ~~102~~ TO BE IMPLEMENTED |

18 | 1 | ~~103~~ TO BE IMPLEMENTED |

24 | 1 | ~~104~~ 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:

MONTHS | DAYS | TRANSFERRED |
---|

0 | 0 | ~~X~~ TO BE IMPLEMENTED |

0 | 6 | ~~X~~ TO BE IMPLEMENTED |