2.7. Something Different¶
What if we could do something different?
Specify & write tests – But not tightly coupled with the APIs.
Specify what you want to happen, not how:
Maps to specification
Maps to implementation
What ever tests we specify now, should be executable, so avoid test implementation stage after test specification review stage.
2.8. Given, When, Then¶
Generally speaking, all our tests can be specified under these three keywords:
Given → When → Then
Some existing pre-condition.
Some action happens.
Then there is a re-action / effect.