示例#1
0
        public void Returns_specific_winner_when_only_one_entrant()
        {
            var raffler = new Raffler();
            var expected = "Per Persson";
            raffler.AddEntrant(expected);

            Assert.AreEqual(expected, raffler.GetRandomWinner());
        }
示例#2
0
        public void Can_return_a_winner()
        {
            var raffler = new Raffler();

            raffler.AddEntrant("Johan Johansson");

            raffler.AddEntrant("Per Persson");

            string winner = raffler.GetRandomWinner();

            Assert.IsNotNullOrEmpty(winner);
        }