Download Test Driven .NET Development with FitNesse
Transcript
PurchaseTicketSuite.BasicCase 20 |Check|Pool value for draw on |01/01/2008|is|10| 21 |Check|Account balance for |john|90| 22 |Ticket with numbers|1,3,4,5,8,10| for |10| dollars is registered for player|john| for draw on |01/01/2008| PurchaseTicketSuite.BasicCase 1 !3 A player registers, transfers money into the account and purchases a ticket. The ticket should be registered for the correct draw in the system, and the account balance and pool size will be adjusted for the ticket value 2 |Purchase Ticket| 3 |Player|john|Deposits|100|dollars with card|4111111111111111|and expiry date|01/12| 4 |Player|john|has|100|dollars| 5 |Player|john|buys a ticket with numbers|1,3,4,5,8,10| for draw on |01/01/2008| 6 |Check|Pool value for draw on |01/01/2008|is|10| 7 |Check|Account balance for |john|90| 8 |Ticket with numbers|1,3,4,5,8,10| for |10| dollars is registered for player|john| for draw on |01/01/2008| PurchaseTicketSuite.NotEnoughMoney 1 !3 When there is not enough money in the account, the ticket purchase should be refused. The ticket should not be registered, account balance and pool value remain untouched. 2 |Purchase Ticket| 3 |Player|john|Deposits|50|dollars with card|4111111111111111|and expiry date|01/12| 4 |reject|Player|john|buys|10| tickets with numbers|1,3,4,5,8,10| for draw on |01/01/2008| 5 |Check|Pool value for draw on |01/01/2008|is|0| 6 |Check|Account balance for |john|50| 7 |Check|Tickets in draw on |01/01/2008|0| 8 |not|Ticket with numbers|1,3,4,5,8,10| for |100| dollars is registered for player|john| for draw on |01/01/2008| PurchaseTicketSuite.SetUp 1 2 3 4 5 6 !|import| |Tristan.Test.PurchaseTicket| |Set Up Test Environment| |Create Draw| |01/01/2008| 247