public void TestTwoSolutionGameCounting() { var solverCounting = new SolverFactory().GenerateSolver(true); var game = new GameFactoryForTesting().GenerateGameTwoSolutions(); Assert.IsFalse(game.IsSolved); int numSolutions = solverCounting.Solve(game); Assert.IsTrue(game.IsSolved); Assert.AreEqual(2, numSolutions); }
public void TestAllGamesCounting() { var solver = new SolverFactory().GenerateSolver(true); var database = new DatabaseFactory().GetDatabase(); foreach (var databaseGame in database.GetAllGames(null)) { Assert.IsFalse(databaseGame.Game.IsSolved); int numSolutions = solver.Solve(databaseGame.Game); Assert.IsTrue(databaseGame.Game.IsSolved); Assert.AreEqual(1, numSolutions); } }