public void find_the_one_and_only_solution() { fileSystem.CreateDirectory("only-one"); fileSystem.WriteStringToFile("only-one".AppendPath("anything.sln"), "whatever"); Environment.CurrentDirectory = Environment.CurrentDirectory.AppendPath("only-one").ToFullPath(); SolutionFinder.FindSolutionFile().ShouldEqual("anything.sln"); }
public void find_multiples_so_it_is_indeterminate() { fileSystem.CreateDirectory("multiples"); fileSystem.CleanDirectory("multiples"); fileSystem.WriteStringToFile("multiples".AppendPath("anything.sln"), "whatever"); fileSystem.WriteStringToFile("multiples".AppendPath("else.sln"), "whatever"); Environment.CurrentDirectory = Environment.CurrentDirectory.AppendPath("multiples").ToFullPath(); SolutionFinder.FindSolutionFile().ShouldBeNull(); // find the multiples too var solutions = SolutionFinder.FindSolutions(); solutions.ShouldHaveTheSameElementsAs( "anything.sln", "else.sln"); }