Banking Kata is a great Kata to practise the Outside-In technique.
I found this Kata in the Codurance and as a big fan of the Outside-In technique, I decided to give it a try. Although I tried the Kata many times with different approaches, in the GitHub link I will post an approach very similar to the one that Sandro Mancuso implements in his video screencasts. In our solution though instead of using the Console as output, we will use an array of strings, and instead of creating the Transaction in the repository (Data Layer) we use a TransactionFactory in the Domain Layer.
This is an example of a statement.
Date || Amount || Balance
22/01/2016 || 300 || 1300
12/01/2016 || -500 || 1000
02/11/2015 || 1500 || 1500
Description:
Write a class named Account that has only the following public methods.
func deposit(amount: Int)
func withdraw(amount: Int)
func printStatement()
You are not allowed to create more public methods or to change the existing method signatures.
Swift solution:
https://github.com/Fragki/BankKata
Resources:
https://katalyst.codurance.com/bank