Buy Utility and Pay Rent to Utility Acceptance Tests
The land value of the utilities is the same. The price and base rent of the utilities are set by the game board. There can be no more than 2 utilities on a game board.
In this test case, the price of each railroad is $150. Assume that all utility dice rolls have a value of 10.
utility1*
fit.ActionFixture | ||
start | edu.ncsu.realestate.Utility | |
press | initialize game board | |
enter | number of players | 2 |
enter | player 1 name | 1 |
enter | player 2 name | 2 |
enter | player dice roll | 4 |
press | purchase property | |
press | end turn | |
check | player A money | 1350 |
check | player A utilities | 1 |
check | player B money | 1500 |
enter | player dice roll | 3 |
press | end turn | |
check | player A money | 1350 |
check | player B money | 1500 |
enter | player dice roll | 7 |
press | purchase property | |
press | end turn | |
check | player A money | 1200 |
check | player A utilities | 2 |
check | player B money | 1500 |
Pay Rent to Utility User Story
When player A lands on player B's utility, A pays rent to B based a dice roll. If player B owns 1 utility, A pays 4 times the dice roll. If player B owns 2 utilities, A pays 10 times the dice roll. There can only be two utilities on a game board.
utility2*
fit.ActionFixture | ||
start | edu.ncsu.realestate.Utility | |
press | initialize game board | |
enter | number of players | 2 |
enter | player 1 name | 1 |
enter | player 2 name | 2 |
enter | player dice roll | 4 |
press | purchase property | |
press | end turn | |
check | player A money | 1350 |
check | player A utilities | 1 |
check | player B money | 1500 |
enter | player dice roll | 3 |
press | end turn | |
check | player A money | 1350 |
check | player B money | 1500 |
enter | player dice roll | 7 |
press | purchase property | |
press | end turn | |
check | player A money | 1200 |
check | player A utilities | 2 |
check | player B money | 1500 |
enter | player dice roll | 8 |
press | end turn | |
check | player A money | 1300 |
check | player B money | 1400 |
utility 2.1
fit.ActionFixture | ||
start | edu.ncsu.realestate.Utility | |
press | initialize game board | |
enter | number of players | 2 |
enter | player 1 name | 1 |
enter | player 2 name | 2 |
enter | player dice roll | 4 |
press | purchase property | |
press | end turn | |
check | player A money | 1350 |
check | player A utilities | 1 |
check | player B money | 1500 |
enter | player dice roll | 4 |
press | end turn | |
check | player A money | 1390 |
check | player B money | 1460 |
Created: 6/18/2004
Modified: 8/22/2004
Return to FIT Summary
Return to RealEstate Example
Copyright © 2004-2006 North Carolina State University, Dr. Laurie Williams, Dright Ho, and Sarah Smith