From: Gustavo Martin Morcuende Date: Sun, 4 Dec 2016 14:18:13 +0000 (+0100) Subject: Acceptance test, README (constraints) X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=544f56c6178b4c33283e72c5463cc62e7f825f94;p=JavaForFun Acceptance test, README (constraints) --- diff --git a/TDD/sandromancuso/bank/README b/TDD/sandromancuso/bank/README index 04e790e..79f54e5 100644 --- a/TDD/sandromancuso/bank/README +++ b/TDD/sandromancuso/bank/README @@ -1,3 +1,48 @@ Sandro Mancuso: Outside in TDD https://www.youtube.com/watch?v=XHnuMjah6ps + +Lear and practice the double loop of TDD +Test application from outside, identifying side effects + + +### Problem description - Bank kata + +Create a simple bank application with the following features: + + - Deposit into Account + - Withdraw from an Account + - Print a bank statement to the console + + +## Acceptance criteria + +Statement should have transactions in the following format: + +> DATE | AMOUNT | BALANCE +> 10 / 04 / 2014 | 500.00 | 1400.00 +> 02 / 04 / 2014 | -100.00 | 900.00 +> 01 / 04 / 2014 | 1000.00 | 1000.00 + + + +## Starting point and constraints + +1. Start with a class the following structure: + + public class Account { + + public void deposit(int amount); + + public void withdraw(int amount); + + public void printStatement(); + + } + +2. You are no allowed to add any other public method to this class. + +3. Use Strings and Integers for dates and amounts (keep it simple) + +4. Don't wory about spacing in the statement printed on the console +