public void Game_Round_Should_Return_False() { var randomizer = new CheatRandomizer(new List <int> { 1, 2, 3, 4 }); var cheatDice = new Dice(randomizer); cheatDice.RollDice(); _diceGame.UserGuess = 0; cheatDice.RollDice(); Assert.IsFalse(_diceGame.GetRoundResult(cheatDice)); }
public void Two_Right_Guesses_Should_Give_Two_Points() { var randomizer = new CheatRandomizer(new List <int> { 1, 2, 3, 4 }); var cheatDice = new Dice(randomizer); var diceGame = new DiceGame(); //diceGame.SetupDiceRandomizer(randomizer); cheatDice.RollDice(); diceGame.UserGuess = 1; cheatDice.RollDice(); diceGame.GetRoundResult(cheatDice); diceGame.UserGuess = 1; cheatDice.RollDice(); diceGame.GetRoundResult(cheatDice); var pointsGained = diceGame.UserPoints; Assert.IsTrue(pointsGained == 2); }
public void Right_Guess_Of_Lower_Number_Should_Give_A_Point() { var randomizer = new CheatRandomizer(new List <int> { 6, 5, 4, 3 }); var cheatDice = new Dice(randomizer); var diceGame = new DiceGame(); cheatDice.RollDice(); diceGame.UserGuess = 0; cheatDice.RollDice(); diceGame.GetRoundResult(cheatDice); var pointsGained = diceGame.UserPoints; Assert.IsTrue(pointsGained == 1); }