public void should_be_straight_2() { var y = new Yatzy( new FakeDice6(5), new FakeDice6(1), new FakeDice6(3), new FakeDice6(2), new FakeDice6(4) ); y.Roll(); bool result = y.IsSmallStraight(); Assert.IsTrue(result); }
public void should_not_be_straight_1() { var y = new Yatzy( new FakeDice6(1), new FakeDice6(1), new FakeDice6(3), new FakeDice6(4), new FakeDice6(5) ); y.Roll(); bool result = y.IsSmallStraight(); Assert.IsFalse(result); }
public void cant_get_straight_all_the_time() { var y = new Yatzy(); int nrOfStraights = 0; for (int i = 0; i < 50; i++) { y.Roll(); if (y.IsSmallStraight()) { nrOfStraights++; } } // Hope we don't get only straight Assert.IsTrue(nrOfStraights != 50); }