public void RenameFolder_Of_Non_Existing_Folder_Events_Log() { var wasCalled = false; FolderLibrary.Log += (e) => wasCalled = true; string originalFolderName = "OriginalFolderName"; string newFolderName = "NewFolderName"; FolderLibrary.RenameFolder(originalFolderName, newFolderName); Assert.IsTrue(wasCalled); }
public void RenameFolder_Of_Existing_Folder_Renames_File() { _pathOriginal = Path.Combine(_assemblyFolder, _directoryNameOriginal); Directory.CreateDirectory(_pathOriginal); Assert.IsTrue(Directory.Exists(_pathOriginal)); string newFolderName = "NewFolderName" + Path.GetRandomFileName(); FolderLibrary.RenameFolder(_pathOriginal, newFolderName); _pathCopied = Path.Combine(_assemblyFolder, newFolderName); Assert.IsTrue(Directory.Exists(_pathCopied)); }