示例#1
0
        public void BuildAtPositionShouldReturnPlayerWithGivenPosition()
        {
            var playerPosition = 15;
            var playerBuilder  = new PlayerBuilder(randomNumber);

            var player = playerBuilder
                         .AtPosition(playerPosition)
                         .Build();

            Assert.That(player.Position, Is.EqualTo(playerPosition));
        }
示例#2
0
        public void BuildAtPositionShoulThrowOutOfCourtBoundsException(int playerPosition)
        {
            var playerBuilder = new PlayerBuilder(randomNumber);

            Assert.That(() => playerBuilder.AtPosition(playerPosition), Throws.TypeOf <OutOfCourtBoundsException>());
        }