protected string CreateTestDirectory(string share) { string testDirectory = CurrentTestCaseName + "_" + Guid.NewGuid().ToString(); string testDirectoryFullPath = Path.Combine(share, testDirectory); testDirectories.Add(testDirectoryFullPath); sutProtocolController.CreateDirectory(share, testDirectory); BaseTestSite.Log.Add(LogEntryKind.Debug, "Create a directory {0} in the share {1}.", testDirectory, share); return(testDirectory); }
protected string CreateTestDirectory(string share) { string testDirectory = CurrentTestCaseName + "_" + Guid.NewGuid().ToString(); string testDirectoryFullPath = Path.Combine(share, testDirectory); testDirectories.Add(CurrentTestCaseName, testDirectoryFullPath); DoUntilSucceed(() => sutProtocolController.CreateDirectory(share, testDirectory), testConfig.Timeout, "Retry to call CreateDirectory until succeed within timeout span."); BaseTestSite.Log.Add(LogEntryKind.Debug, "Create a directory {0} in the share {1}.", testDirectory, share); return(testDirectory); }
private string CreateTestDirectoryInternal(string uncSharePath, string parentDirectoryName) { string testDirectory = string.IsNullOrEmpty(parentDirectoryName) ? null : $"{parentDirectoryName}\\"; testDirectory += CurrentTestCaseName + "_" + Guid.NewGuid().ToString(); string testDirectoryFullPath = string.Format(@"{0}\{1}", uncSharePath, testDirectory); testDirectories.Add(testDirectoryFullPath); sutProtocolController.CreateDirectory(uncSharePath, testDirectory); BaseTestSite.Log.Add(LogEntryKind.Debug, "Create a directory {0} in the share {1}.", testDirectory, uncSharePath); return(testDirectory); }