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

            randomGrid.Remove(numberToRemove);

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

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

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