예제 #1
0
 private void RollDices(int dicesCount)
 {
     var diceRoller = new DiceRoller();
     var combination = diceRoller.Roll(dicesCount);
     Assert.AreEqual(combination.Count, dicesCount);
     for (var i = 0; i < dicesCount; i++ )
         Assert.IsTrue(combination[i].Value > 0 && combination[i].Value <= 6);
 }
예제 #2
0
 public void InitializeFullCombination()
 {
     var player = new DiceRoller();
     var dices = player.Roll(5);
     var combination = new DiceCombination();
     combination.Add(dices.ToArray());
     Assert.IsTrue(combination.Completed);
 }
예제 #3
0
 public void InititializeNotFullCombination()
 {
     var player = new DiceRoller();
     var dices = player.Roll(3);
     var combination = new DiceCombination();
     combination.Add(dices.ToArray());
     Assert.IsFalse(combination.Completed);
     Assert.AreEqual(combination.Dices.Count, 3);
 }