コード例 #1
0
ファイル: Door.cs プロジェクト: TomH-NZ/Kata-MontyHallv1
 public static string AssignRandomPrize(PrizeDoors selectedDoor, IRandomPrizeDoorAssigner prizeDoor)
 {
     return(selectedDoor == prizeDoor.PrizeDoor() ? "serious" : "joke");
 }
コード例 #2
0
        public void ShowAPrizeWhenAWinningDoorIsSelectedWithMemberData(PrizeDoors door, string prize, IRandomPrizeDoorAssigner randomPrizeDoorAssigner)
        {
            //Arrange

            //Act
            var result = Door.AssignRandomPrize(door, randomPrizeDoorAssigner);

            //Assert
            Assert.Equal(prize, result);
        }