Ejemplo n.º 1
0
        public void AddSearchPathRelativePath(PythonVisualStudioApp app)
        {
            var project = app.OpenProject(@"TestData\AddSearchPaths.sln");

            app.OpenSolutionExplorer().SelectProject(project);

            using (var dialog = SelectFolderDialog.AddFolderToSearchPath(app)) {
                dialog.FolderName = TestData.GetPath(@"TestData\Outlining");
                dialog.SelectFolder();
            }
            System.Threading.Thread.Sleep(1000);
            app.ExecuteCommand("File.SaveAll");

            var    text   = File.ReadAllText(TestData.GetPath(@"TestData\AddSearchPaths\AddSearchPaths.pyproj"));
            string actual = Regex.Match(text, @"<SearchPath>.*</SearchPath>", RegexOptions.Singleline).Value;

            Assert.AreEqual("<SearchPath>..\\Outlining\\</SearchPath>", actual);
        }