public void BuildAtPositionShouldReturnPlayerWithGivenPosition() { var playerPosition = 15; var playerBuilder = new PlayerBuilder(randomNumber); var player = playerBuilder .AtPosition(playerPosition) .Build(); Assert.That(player.Position, Is.EqualTo(playerPosition)); }
public void BuildAtPositionShoulThrowOutOfCourtBoundsException(int playerPosition) { var playerBuilder = new PlayerBuilder(randomNumber); Assert.That(() => playerBuilder.AtPosition(playerPosition), Throws.TypeOf <OutOfCourtBoundsException>()); }