Exemplo n.º 1
0
        public void BuildWithEvenOrOddOptionShouldReturnPlayerWithCorrectEvenOddOption(string evenOrOdd, EvenOrOddOption expectEnumOption)
        {
            var playerBuilder = new PlayerBuilder(randomNumber);

            var player = playerBuilder
                         .WithEvenOrOddOption(evenOrOdd)
                         .Build();

            Assert.That(player.EvenOrOdd, Is.EqualTo(expectEnumOption));
        }
Exemplo n.º 2
0
        public void BuildWithEvenOrOddOptionShouldReturnPlayerWithCorrectEvenOddOption()
        {
            var playerBuilder = new PlayerBuilder(randomNumber);

            Assert.That(() => playerBuilder.WithEvenOrOddOption("impar"), Throws.TypeOf <InvalidEvenOddOptionException>());
        }