public void BuildWithLevelShouldThrowInvalidLevelException() { var level = "iniciante"; var playerBuilder = new PlayerBuilder(randomNumber); Assert.That(() => playerBuilder.WithLevel(level), Throws.TypeOf <InvalidLevelException>()); }
public void BuildWithLevelShouldReturnPlayerWithGivenLevelIndependentlyOfCase(string level) { var playerBuilder = new PlayerBuilder(randomNumber); var player = playerBuilder .WithLevel(level) .Build(); Assert.That(player.Level, Is.EqualTo(PlayerLevel.Beginner)); }