protected override void TestCleanup() { foreach (var directory in testDirectories) { try { sutProtocolController.DeleteDirectory(Smb2Utility.GetShareName(directory), Smb2Utility.GetFileName(directory)); } catch { } } foreach (var fileName in testFiles) { try { sutProtocolController.DeleteFile(Smb2Utility.GetShareName(fileName), Smb2Utility.GetFileName(fileName)); } catch { } } base.TestCleanup(); }
public override void Reset() { foreach (var directory in testDirectories) { try { sutProtocolController.DeleteDirectory(Smb2Utility.GetShareName(directory), Smb2Utility.GetFileName(directory)); } catch { } } testDirectories.Clear(); foreach (var fileName in testFiles) { try { sutProtocolController.DeleteFile(Smb2Utility.GetShareName(fileName), Smb2Utility.GetFileName(fileName)); } catch { } } testFiles.Clear(); base.Reset(); }
protected override void TestCleanup() { if (testDirectories.ContainsKey(CurrentTestCaseName)) { string testDirectoryFullPath = testDirectories[CurrentTestCaseName]; DoUntilSucceed(() => sutProtocolController.DeleteDirectory(Smb2Utility.GetShareName(testDirectoryFullPath), Smb2Utility.GetFileName(testDirectoryFullPath)), testConfig.Timeout, "Retry to call DeleteDirectory until succeed within timeout span."); testDirectories.Remove(CurrentTestCaseName); } base.TestCleanup(); }