Skip to content

Example of typical model code driven completely by tests

License

Notifications You must be signed in to change notification settings

Cs4r/the-money-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Money example

Example of typical model code driven completely by tests took from the famous Kent Beck's book: Test Driven Development: By Example.

The aim of this repo was to track the progress made through the reading of such a book.

The TDD cycle followed

  1. Add a little test
  2. Run all tests and fail
  3. Make a change
  4. Run the tests and succeed
  5. Refactor to remove duplication

Keys when applying TDD

  • The three approaches to making a test work cleanly: fake it, triangulation and obvious implementation
  • Removing duplication between test and code as a way to drive the design
  • The ability to control the gap between tests to increase traction when the road gets slippery and cruise faster when conditions are clear

About

Example of typical model code driven completely by tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages