public void TestGetPossibilities() { RemainderStrat solverStrat = new RemainderStrat(); FileIO fileIO = new FileIO(); Puzzle newPuzzle = fileIO.ReadPuzzle(puzzleIncomplete); Assert.AreEqual(solverStrat.GetPossibilities(newPuzzle, 1, 0), '4'); }
public void TestRemainderSolve() { RemainderStrat remainderStrat = new RemainderStrat(); FileIO fileIO = new FileIO(); Puzzle incompletePuzzle = fileIO.ReadPuzzle(puzzleIncomplete); Puzzle completePuzzle = fileIO.ReadPuzzle(puzzleComplete); Assert.AreEqual(remainderStrat.Solve(incompletePuzzle).Plane, completePuzzle.Plane); }
public void TestGetInBlock() { RemainderStrat solverStrat = new RemainderStrat(); FileIO fileIO = new FileIO(); Puzzle newPuzzle = fileIO.ReadPuzzle(puzzleIncomplete); string inBlock = "2-13"; Assert.AreEqual(solverStrat.GetInCol(newPuzzle, 1, 1), inBlock); }
public void TestGetInRow() { RemainderStrat solverStrat = new RemainderStrat(); FileIO fileIO = new FileIO(); Puzzle newPuzzle = fileIO.ReadPuzzle(puzzleIncomplete); string inRow = "2-31"; Assert.AreEqual(solverStrat.GetInCol(newPuzzle, 1, 0), inRow); }
public void TestCheckIfSolved() { RemainderStrat solverStrat = new RemainderStrat(); FileIO fileIO = new FileIO(); Puzzle newPuzzle = fileIO.ReadPuzzle(puzzleIncomplete); Assert.AreEqual(solverStrat.CheckIfSolved(newPuzzle), false); newPuzzle = fileIO.ReadPuzzle(puzzleComplete); Assert.AreEqual(solverStrat.CheckIfSolved(newPuzzle), true); }