public void SudukoBoard_Solve_SmallWithSolution() { // Arrange SudokuBoard board = SudokuFactory.SizeAndBoxes(4, 4, 2, 2, new[] { "0003", "0004", "1000", "4000" }); string[] tileDefinitions = new[] { "2413", "3124", "1342", "4231" }; // Act IEnumerable <SudokuBoard> solutions = board.Solve(); // Assert Assert.Single(solutions); Assert.Equal(tileDefinitions, solutions.Single().TileDefinitions); }
public void SudokuBoard_Solve_NoSolutionFound() { // Arrange SudokuBoard board = SudokuFactory.SizeAndBoxes(4, 4, 2, 2, new[] { "0003", "0204", // the 2 must be a 1 on this row to be solvable "1000", "4000" }); // Act IEnumerable <SudokuBoard> solutions = board.Solve(); // Assert Assert.False(solutions.Any()); }