예제 #1
0
        public void Remove_ShouldEmptyTheSpecifiedNumberOfCells(int numberToRemove)
        {
            var randomGrid = SudokuGrid.BuildRandomFilledGrid();

            randomGrid.Remove(numberToRemove);

            randomGrid.CountEmptyCells().Should().Be(numberToRemove);
        }
예제 #2
0
        public void CanInsertValue_WhenValueAlreadyExistsInLine_ShouldReturnFalse()
        {
            var randomGrid = SudokuGrid.BuildRandomFilledGrid();

            randomGrid.CanInsertValue(randomGrid[0, 0], 0, 8).Should().BeFalse();
        }
예제 #3
0
        public void BuildRandomFilledGrid_ShouldReturnValidGrid()
        {
            var randomGrid = SudokuGrid.BuildRandomFilledGrid();

            randomGrid.IsValid().Should().BeTrue();
        }