public void GivenAnArrayOfRolls_TheLenght_IsAsExpected() { var inputRolls = new[] { new Roll(0) }; var rolls = new BowlingRolls(inputRolls); Assert.AreEqual(1, rolls.Count); }
public void ItReturns_TheSumOfRequestedRolls(int howMany, int expectedTotal) { var inputRolls = Enumerable.Range(1, howMany) .Select(value => new Roll(value)) .ToArray(); var rolls = new BowlingRolls(inputRolls); Assert.AreEqual(expectedTotal, rolls.TakeRolls(howMany).Value); }
public void IfITake_ARoll_IHave_OneRollLess() { var inputRolls = new[] { new Roll(0) }; var rolls = new BowlingRolls(inputRolls); int count = rolls.Count; rolls.Dequeue(); Assert.AreEqual(count - 1, rolls.Count); }