Esempio n. 1
0
 public void DieDefaultNumberOfSidesIs6()
 {
     Die die = new Die();
     const int expectedResult = 6;
     Assert.AreEqual(die.Sides(), expectedResult);
 }
Esempio n. 2
0
 public void DieRolls()
 {
     Die die = new Die();
     bool test = true;
     int numTests = 0;
     while (numTests++ <= 100 && test)
     {
         die.Roll();
         test = (die.Value() >= 1 && die.Value() <= die.Sides());
     }
     Assert.IsTrue(test);
 }
Esempio n. 3
0
 public void DieAssignNumberOfSides()
 {
     Die die = new Die(8);
     const int expectedResult = 8;
     Assert.AreEqual(die.Sides(), expectedResult);
 }