public void OneOfTheDoorsHoldsThePrize() { var doorNumberThatHoldsPrize = 1; var prizeSelector = new PrizeSelectorFake(doorNumberThatHoldsPrize: doorNumberThatHoldsPrize); var montyHall = new MontyHall(prizeSelector); montyHall.DefineWinningDoor(); Assert.That(montyHall.WinningDoor.ContainsPrize, Is.EqualTo(true)); Assert.That(montyHall.WinningDoor.Number, Is.EqualTo(doorNumberThatHoldsPrize)); }
public void RevealsDoorWithNoPrize() { var doorNumberThatHoldsPrize = 1; var prizeSelector = new PrizeSelectorFake(doorNumberThatHoldsPrize: doorNumberThatHoldsPrize); var montyHall = new MontyHall(prizeSelector); montyHall.DefineWinningDoor(); var door = montyHall.RevealDoorWithNoPrize(); Assert.That(door.Number, Is.EqualTo(2)); Assert.That(door.ContainsPrize, Is.EqualTo(false)); }