Beispiel #1
0
        public override bool Execute()
        {
            SolutionBuilder
            .FromTraversalProject(
                TraversalProjectFile,
                SolutionFile,
                log: Log)
            .Write();

            return(true);
        }
        public void GenerateSolution(string projectFile, bool updateExistingSolution)
        {
            var projectPath           = Path.Combine(solutionsDirectory, projectFile);
            var referenceSolutionPath = Path.ChangeExtension(projectPath, ".sln");
            var testSolutionPath      = referenceSolutionPath + ".test";

            File.Delete(testSolutionPath);

            if (updateExistingSolution)
            {
                File.Copy(referenceSolutionPath, testSolutionPath, true);
            }

            SolutionBuilder
            .FromTraversalProject(projectPath, testSolutionPath)
            .Write();

            Assert.Equal(
                File.ReadAllText(referenceSolutionPath),
                File.ReadAllText(testSolutionPath));
        }