Example #1
0
        public void Delete_ProjectItemIsFile_ProjectIsSaved()
        {
            CreateProjectItems(@"d:\projects\myproject\myproject.csproj");
            msbuildProject.AddFile(@"src\program.cs");
            global::EnvDTE.ProjectItem directoryItem = projectItems.Item("src");
            global::EnvDTE.ProjectItem fileItem      = directoryItem.ProjectItems.Item("program.cs");

            fileItem.Delete();

            Assert.IsTrue(msbuildProject.IsSaved);
        }
Example #2
0
        public void Delete_ProjectItemIsFile_FileIsDeleted()
        {
            CreateProjectItems(@"d:\projects\myproject\myproject.csproj");
            msbuildProject.AddFile(@"src\program.cs");
            global::EnvDTE.ProjectItem directoryItem = projectItems.Item("src");
            global::EnvDTE.ProjectItem fileItem      = directoryItem.ProjectItems.Item("program.cs");

            fileItem.Delete();

            Assert.AreEqual(@"d:\projects\myproject\src\program.cs", testableDteProject.FakeFileService.PathPassedToRemoveFile);
        }