Purchasing Property User Story Acceptance Test

When a player lands on a property cell, and it is available, the player may purchase the property if the player has enough money. The price is the land value of that property.

purchaseProperty1*

fit.ActionFixture
start edu.ncsu.realestate.PurchasingProperty  
press initialize game board  
enter number of players 2
enter player 1 name 1
enter player 2 name 2
check player money 1500
enter player dice roll 2
check property available true
press purchase property  
check player money 1400
check property available false
check player owns blue 2 true
press end turn  

purchaseProperty2

fit.ActionFixture
start edu.ncsu.realestate.PurchasingProperty  
press initialize game board  
enter number of players 2
enter player 1 name 1
enter player 2 name 2
check player money 1500
enter player dice roll 2
check property available true
press purchase property  
check player money 1400
check property available false
check player owns blue 2 true
press end turn  
enter player dice roll 3
press end turn  
enter player dice roll 6
check property available false

purchaseProperty3

fit.ActionFixture
start edu.ncsu.realestate.PurchasingProperty  
press initialize game board  
enter number of players 2
enter player 1 name 1
enter player 2 name 2
check player money 1500
enter player dice roll 3
check property available true
press purchase property  
check player money 1380
check property available false
check player owns blue 3 true
press end turn  
enter player dice roll 3
check property available false

purchaseProperty4

fit.ActionFixture
start edu.ncsu.realestate.PurchasingProperty  
press initialize game board  
enter number of players 2
enter player 1 name 1
enter player 2 name 2
check player money 1500
enter player dice roll 5
check property available true
press purchase property  
check player money 1500
check property available true
check player owns green 1 false
press end turn  

A player cannot purchase a property that is already purchased by other players. Also, the Go cell cannot be purchased.

In a 2-player situation, when player 1 ends his turn, player 2's turn starts.

fit.ActionFixture
start edu.ncsu.realestate.PurchasingProperty2Players  
press initialize game board  
enter number of players 2
enter player 1 name 1
enter player 2 name 2
check player turn 0
enter player dice roll 2
check property available true
press purchase property  
press end turn  
check player turn 1
enter player dice roll 2
check property available false
press end turn  
check player turn 0
enter player dice roll 4
check property available false
press end turn  

Created: 5/28/2004
Modified: 8/22/2005

Return to FIT Summary
Return to RealEstate Example

Copyright © 2004-2006 North Carolina State University, Dr. Laurie Williams, Dright Ho, and Sarah Smith