public void TC_SearchResults() { var problem = new Planner.SAS.Problem(new SASInputData(GetFilePath("TC_SearchResults.sas"))); var heuristic = new PDBHeuristic(problem); var problem2 = new Planner.SAS.Problem(new SASInputData(GetFilePath("TC_SearchResults2.sas"))); var heuristic2 = new PDBHeuristic(problem2); var heap = new RegularBinaryHeap(); var search1 = new AStarSearch(problem, heuristic, heap); var solution1 = search1.Start(); Assert.AreEqual(ResultStatus.SolutionFound, solution1); Assert.IsNotNull(search1.GetSolutionPlan()); var search2 = new AStarSearch(problem2, heuristic2, heap); var solution2 = search2.Start(); Assert.AreEqual(ResultStatus.NoSolutionFound, solution2); Assert.IsNull(search2.GetSolutionPlan()); var search3 = new AStarSearch(problem, heuristic, heap, false, new TimeSpan(0), 5000); var solution3 = search3.Start(); Assert.AreEqual(ResultStatus.TimeLimitExceeded, solution3); Assert.IsNull(search3.GetSolutionPlan()); var search4 = new AStarSearch(problem, heuristic, heap, false, new TimeSpan(0, 1, 0), 0); var solution4 = search4.Start(); Assert.AreEqual(ResultStatus.MemoryLimitExceeded, solution4); Assert.IsNull(search4.GetSolutionPlan()); }