public void Save_FileNameNotPassedAndFileNotOpen_FileNotSaved() { CreateProjectItems(); msbuildProject.FileName = @"d:\projects\MyProject\MyProject.csproj"; msbuildProject.AddFile(@"program.cs"); global::EnvDTE.ProjectItem item = projectItems.Item("program.cs"); item.Save(); Assert.IsFalse(fakeFileService.IsSaveFileCalled); }
public void Save_FileNameNotPassed_SavesFile() { CreateProjectItems(); msbuildProject.FileName = @"d:\projects\MyProject\MyProject.csproj"; msbuildProject.AddFile(@"program.cs"); IViewContent view = OpenFileInSharpDevelop(@"d:\projects\MyProject\program.cs", false); global::EnvDTE.ProjectItem item = projectItems.Item("program.cs"); item.Save(); Assert.AreEqual(view, fakeFileService.ViewContentPassedToSaveFile); }