Beispiel #1
0
        public void pick_car_produce_other_door_with_goat()
        {
            // Arrange
            var doors = new FakeDoors(new List <IDoor>()
            {
                new Door(), new Door(), new Door()
            });

            doors.SetAllToGoats();
            doors.RandomlyPlaceCar();

            var game = new Game(doors, new SimulationResponseThingy(true));

            // Act
            var doorNumber = game.GetOtherGoatDoor(1);

            // Assert
            Assert.Equal(2, doorNumber);
        }
Beispiel #2
0
        public void produce_which_door_has_car_prize()
        {
            // Arrange
            var doors = new FakeDoors(new List <IDoor>()
            {
                new Door(), new Door(), new Door()
            });

            doors.SetAllToGoats();
            doors.RandomlyPlaceCar();

            var game = new Game(doors, new SimulationResponseThingy(true));

            // Act
            var doorNumber = game.GetCarDoor();

            // Assert
            Assert.Equal(1, doorNumber);
        }