public void TransferItem() { var project = DebugProject.OpenProject(@"Python.VS.TestData\HelloWorld.sln"); var app = new VisualStudioApp(VsIdeTestHostContext.Dte); string filename, basename; int i = 0; do { i++; basename = "test" + i + " .py"; filename = Path.Combine(Path.GetTempPath(), basename); } while (System.IO.File.Exists(filename)); System.IO.File.WriteAllText(filename, "def f(): pass"); var fileWindow = app.Dte.ItemOperations.OpenFile(filename); app.MoveCurrentFileToProject("HelloWorld"); app.OpenSolutionExplorer(); var window = app.SolutionExplorerTreeView; Assert.AreNotEqual(null, window.WaitForItem("Solution 'HelloWorld' (1 project)", "HelloWorld", basename)); Assert.AreEqual(fileWindow.Caption, basename); System.IO.File.Delete(filename); }