Skip to content

eriksacre/BankKataFs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Outside-In TDD in F# with Acceptance Tests

Adapted from Sandro Mancuso's bank-kata-outsidein-screencast.

Objective

Learn 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

Start with a module with following function signatures:

module AccountService =
    Deposit: Amount -> unit
    Withdraw: Amount -> unit
    PrintStatement: unit -> unit

You are not allowed to add any other public functions to this module.

NOTE: In order to keep the exercise simple, use an int-alias (Amount) for money and string-alias (Date) for dates. Also, you can ignore the formatting of the statement (spaces between pipes and words, etc).

About

F# version of the Bank Kata

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages