GitXplorerGitXplorer
i

TDD_Rediscovered_ProgrammerTests

public
3 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
8f98704f4b7a3ca095923177338ab759b0128576

Refactor neighbour count to separate class

iiancooper committed 4 years ago
Unverified
bb754774bea22a6a664f27849f76d172f8ebc21e

Remove duplication from array indexing values by naming the variables

iiancooper committed 4 years ago
Unverified
ae86a4a01eb9cf59368902e2b3156ea837517603

Get first test working that requires us to create a check neighbors algorithm

iiancooper committed 4 years ago
Unverified
fe118162307ae917fbf81e8391ec0a3ab528ac73

test fails with three cells...now we need to write some code

iiancooper committed 4 years ago
Unverified
a6d62274f17697667682f25bcfbd2ad05b177b2f

Second test passes, still faking, nothing has forced us to write more code...yet...so more tests needed

iiancooper committed 4 years ago
Unverified
d29011117af374d76e23c9f06d5815d2d1fc3c20

Add a __repr__ so that pytest gives us better feedback on failure

iiancooper committed 4 years ago

README

The README file for this repository.

TDD Rediscovered - ProgrammerTests

What is this?

This is an implementation of Conway's Game of Life, used to support my course: TDD Rediscovered.

It is public to support students of that course reviewing the code used.

The Rules

The code was created as a kata, using the following rules:

  • We are writing Programmer Tests. A failing test tells us that the last edit to the source is the source of an issue

  • The prompt to write a test is a new requirement. We assume that we obtained these when elaborating the story with the customer.

  • When we discover that we need new collaborators by refactoring we ask: are they part of our public interface or an implementation detail. We don’t test implementation details

Branches

The master branch is the output of the original kata.

There are two branches:

  • Refactoring Steps: The commits here show various refactorings, which may be well advised (removing duplication) or ill-advised (intrdocuing a class hierachy). Their goal is to show that we can refactor details, without writing new tests around those details, if they are private.
  • Clean Architecture: This branch makes the code runnable. It seeks to demonstrate that the idea of Clean Architecure - adapaters, use cases, and entities - can be implemented straightforwardly, and let us separate the 'hard to test' concepts easily. Ultimately 'Game' here would be a good test target to drive TDD.