Exemplo n.º 1
0
        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"));
        }
Exemplo n.º 2
0
        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"));
        }