Пример #1
0
        public void Bishop_given_valid_coordinates_should_move_to_valid_co_ordinates(string initialCellPosition, int expectedOutcomesCount, string expectedOutcomesStr)
        {
            var initialPosition  = new Position(initialCellPosition);
            var bishop           = new Bishop(initialPosition, PieceColours.White);
            var possibleOutcomes = bishop.GetPossiblePositions(_direction);

            possibleOutcomes.Count.Should().Be(expectedOutcomesCount);
            var positions = possibleOutcomes.Select(x => x.CellPosition).ToList();
            var expectedPossibleOutcomes = expectedOutcomesStr.Split(",", StringSplitOptions.RemoveEmptyEntries);

            positions.Should().Contain(expectedPossibleOutcomes);
        }