Beispiel #1
0
        public async Task FindContainingProjects_ProjectFileIsChanged_ReturnsProject()
        {
            await _analyzer.LoadSolution(_vcxprojSolution, CancellationToken.None);

            string project = Path.Combine(TestContext.CurrentContext.TestDirectory, @"Data\SampleProjects\CppClrLibrary\CppClrLibrary.vcxproj");
            var    files   = new List <string> {
                project
            };

            var result = _analyzer.FindContainingProjects(files);

            Assert.AreEqual(result.Count, 1, "There should be exactly 1 changed project");
            Assert.AreEqual(project, result.Single(), "The changed project should match the file passed in");
        }
 public void FindContainingProjects_SolutionNotLoaded_Throws()
 {
     Assert.Throws <InvalidOperationException>(() => _analyzer.FindContainingProjects(new List <string> {
         "Program.cs"
     }));
 }