Пример #1
0
        public void BuildWithLevelShouldThrowInvalidLevelException()
        {
            var level         = "iniciante";
            var playerBuilder = new PlayerBuilder(randomNumber);

            Assert.That(() => playerBuilder.WithLevel(level), Throws.TypeOf <InvalidLevelException>());
        }
Пример #2
0
        public void BuildWithLevelShouldReturnPlayerWithGivenLevelIndependentlyOfCase(string level)
        {
            var playerBuilder = new PlayerBuilder(randomNumber);

            var player = playerBuilder
                         .WithLevel(level)
                         .Build();

            Assert.That(player.Level, Is.EqualTo(PlayerLevel.Beginner));
        }