public void AddFromFileCopy_AddExistingFileNameInsideProjectFolder_ProjectUpdaterIsDisposed() { CreateProjectItems(@"d:\projects\myproject\myproject.csproj"); IProjectBrowserUpdater projectBrowserUpdater = CreateProjectBrowserUpdater(); string fileName = @"d:\projects\myproject\test.cs"; fakeFileService.ExistingFileNames.Add(fileName); projectItems.AddFromFileCopy(fileName); projectBrowserUpdater.AssertWasCalled(updater => updater.Dispose()); }
public void AddFromDirectory_EmptyDirectoryInsideProject_ProjectBrowserUpdaterIsDisposed() { CreateProjectItems(@"d:\projects\myproject\myproject.csproj"); IProjectBrowserUpdater projectBrowserUpdater = CreateProjectBrowserUpdater(); string directory = @"d:\projects\myproject\tools"; projectItems.AddFromDirectory(directory); bool saved = msbuildProject.IsSaved; projectBrowserUpdater.AssertWasCalled(updater => updater.Dispose()); }
public void AddFromFile_FullFileNameIsInsideProject_ProjectBrowserUpdaterIsDisposed() { CreateProjectItems(); IProjectBrowserUpdater projectBrowserUpdater = CreateProjectBrowserUpdater(); msbuildProject.FileName = @"d:\projects\myproject\myproject.csproj"; string fileName = @"d:\projects\myproject\tools\test.cs"; msbuildProject.ItemTypeToReturnFromGetDefaultItemType = ItemType.Page; projectItems.AddFromFile(fileName); projectBrowserUpdater.AssertWasCalled(updater => updater.Dispose()); }
public void AddFromFile_AddFromFileFromProjectItemsBelongingToFile_ProjectBrowserUpdaterIsDisposed() { string projectFileName = @"d:\projects\myproject\MyProject.csproj"; CreateProjectWithOneFileInProjectFolder("MainForm.cs", projectFileName); IProjectBrowserUpdater projectBrowserUpdater = CreateProjectBrowserUpdater(); CreateFileProjectItemsFromFileInProjectFolder("MainForm.cs"); string fileName = @"d:\projects\myproject\MainForm.Designer.cs"; fileProjectItems.AddFromFile(fileName); projectBrowserUpdater.AssertWasCalled(updater => updater.Dispose()); }