public void GetProjects_should_parse_solution_and_fetch_projects_and_cache_result() { var projects = _info.GetProjects(); Assert.True(projects.Any()); Assert.AreSame(projects, _info.GetProjects()); }
public void SetUp() { var solutionPath = TestUtility.GetFixturePath(@"ndriven\NDriven.sln"); var info = new ParserInfo(solutionPath); var web = info.GetProjects().First(p => p.Name == "Presentation.Web"); _doc = new ProjectDocument(web, info); }
public void SetUp() { var path = TestUtility.GetFixturePath("NDriven.sln"); _info = new ParserInfo(path); _assembler = new SolutionAssembler(_info); var projects = _info.GetProjects(); SetUpFiles(); SetUpProjects(projects); }
public void Assemble_should_overrwrite_contents_if_name_not_given() { //arrange var info = new ParserInfo(TestUtility.GetFixturePath("NDrivenCopy.sln")); var assembler = new SolutionAssembler(info); SetUpProjects(info.GetProjects()); //act assembler.Assemble(FormatVersion, VisualStudioVersion); //assert var fixture = TestUtility.GetFileContents("ExpectedAssembly.sln"); Assert.AreEqual(fixture, TestUtility.GetFileContents("NDrivenCopy.sln")); }
public void Assemble_should_overwrite_original_solution_file() { //arrange var info = new ParserInfo(TestUtility.GetFixturePath("NDrivenCopy.sln")); var assembler = new SolutionAssembler(info); SetUpProjects(info.GetProjects()); //act assembler.Assemble("NewSolution", FormatVersion, VisualStudioVersion); //assert var fixture = TestUtility.GetFileContents("ExpectedAssembly.sln"); Assert.True(File.Exists(TestUtility.GetFixturePath("NewSolution.sln"))); Assert.AreEqual(fixture, TestUtility.GetFileContents("NewSolution.sln")); }