Пример #1
0
        public void GetHighestScoringPosition_returns_cell_with_highest_point_value( )
        {
            var positions = new List <Cell>
            {
                new Cell {
                    PointValue = 2
                },
                new Cell {
                    PointValue = 1
                },
                new Cell {
                    PointValue = 7
                },
                new Cell {
                    PointValue = 5
                }
            };

            var sut = OthelloAI.GetHighestScoringPosition(positions);

            Assert.Equal(7, sut.PointValue);
        }
Пример #2
0
        public void GetHighestScoringPosition_throws_when_empty_list( )
        {
            var positions = new List <Cell>( );

            var ex = Assert.Throws <InvalidOperationException>(() => OthelloAI.GetHighestScoringPosition(positions));
        }