public void TestUserLosesIfNotDouble() { var wager = new Wager() { Stake = 1.0f }; var diceRoll = new DiceRollMachine(); var testRoller = new TestDiceRollProvider(); diceRoll.DiceRoller = testRoller; testRoller.PreDeterminedRolls = new[] { 6, 1 }; var result = diceRoll.Play(wager); Assert.IsFalse(result.IsSuccess); }
public void TestPaysOutNinePoundOnDoubleSix() { var wager = new Wager() { Stake = 1.0f }; var diceRoll = new DiceRollMachine(); var testRoller = new TestDiceRollProvider(); diceRoll.DiceRoller = testRoller; testRoller.PreDeterminedRolls = new[] { 6, 6 }; var result = diceRoll.Play(wager); Assert.AreEqual(9.0f, result.Returns, 0.01f); }