public void SingleDie(int value) { var diceResult = new DiceResult(new int[] { value }); Assert.AreEqual(value, diceResult[0]); Assert.AreEqual(value, diceResult.Sum()); }
public void SingleDie(int value) { var diceResult = new DiceResult(new int[]{value}); Assert.AreEqual(value, diceResult[0]); Assert.AreEqual(value, diceResult.Sum()); }
public void SummaryReturnsEmptyByDefault() { var diceResult = new DiceResult(new int[0]); var orderedDice = diceResult.Summary(); Assert.IsNotNull(orderedDice); Assert.IsEmpty(orderedDice); Assert.AreEqual(0, diceResult.Sum()); }
public void OrdersMultipleValuesAdded() { var diceResult = new DiceResult(new[] { 3, 5, 2, 3 }); Assert.AreEqual(2, diceResult[0]); Assert.AreEqual(3, diceResult[1]); Assert.AreEqual(3, diceResult[2]); Assert.AreEqual(5, diceResult[3]); Assert.AreEqual(13, diceResult.Sum()); }
public void OrdersMultipleValuesAdded() { var diceResult = new DiceResult(new []{3, 5, 2, 3}); Assert.AreEqual(2, diceResult[0]); Assert.AreEqual(3, diceResult[1]); Assert.AreEqual(3, diceResult[2]); Assert.AreEqual(5, diceResult[3]); Assert.AreEqual(13, diceResult.Sum()); }