Acceptance test-driven development: Difference between revisions

Content deleted Content added
Cucumber layout and added the rule about statements starting with 'And"
Line 38:
: The state of the system has changed or an output has been produced
 
Also, it is possible to add Statements that start with '''AND''' in any of the sections below (Given, When, Then).
For the example requirement, the steps could be listed as:
 
For the example requirement, the steps could be listed as:<syntaxhighlight lang="cucumber">
'''Given:'''
:Given Book that has not been checked out
 
:And User who is registered on the system
: Book that has not been checked out
:When User checks out a book
: User who is registered on the system
:Then Book is marked as checked out
 
</syntaxhighlight>
'''When:'''
 
: User checks out a book
 
'''Then:'''
 
: Book is marked as checked out
 
=== Complete test ===