public override bool Equals(object obj)
        {
            FileNameAndDirectory rhs = obj as FileNameAndDirectory;

            if (rhs != null)
            {
                return((FileName == rhs.FileName) &&
                       (Folder == rhs.Folder));
            }
            return(false);
        }
		public void DeleteFile_DeletesFileFromSubFolder_FileDeletionLogged()
		{
			CreateTestProject(@"d:\temp\MyProject.csproj");
			AddFileToProject(@"d:\temp\src\Files\test.cs");
			CreateProjectSystem(project);
			
			projectSystem.DeleteFile(@"src\Files\test.cs");
			
			var expectedFileNameAndFolder = new FileNameAndDirectory() {
				FileName = "test.cs",
				Folder = @"src\Files"
			};
			
			var actualFileNameAndFolder = projectSystem.FileNameAndDirectoryPassedToLogDeletedFileFromDirectory;
			
			Assert.AreEqual(expectedFileNameAndFolder, actualFileNameAndFolder);
		}
Esempio n. 3
0
 protected override void LogDeletedFileFromDirectory(string fileName, string directory)
 {
     FileNameAndDirectoryPassedToLogDeletedFileFromDirectory = new FileNameAndDirectory(fileName, directory);
 }
		protected override void LogDeletedFileFromDirectory(string fileName, string directory)
		{
			FileNameAndDirectoryPassedToLogDeletedFileFromDirectory = new FileNameAndDirectory(fileName, directory);
		}