BDD - Uncle Bob's Stable State
In a TDD thread on tests as specifications there was a link to Uncle Bob talking about Stable State: An Emergent Rule, an excerpt is:
If you look carefully at the specification of the Bowling Game you will see that the state of the Game
is changed only by the setup
block within the context
blocks. The specify
blocks simply interrogate and verify state. This is in stark contrast to the JUnit tests in which the test
methods both change and verify the state of the Game
.
Really its the same idea as some people practicing BDD have, keep the test/specification methods small and preferably just doing Assertions (or mock verifications I guess).
No comments:
Post a Comment