public void SetUp() { var config = ITUtils.GetConfig(); string localPath = config[1].ToString(); this.testFolder = Path.Combine(localPath, Guid.NewGuid().ToString()); this.longPath = Path.GetFullPath(this.testFolder); string shortName = "1234567890"; for (int i = 0; i < 30; i++) { this.longPath = Path.Combine(this.longPath, shortName); } var dir = Factory.CreateDirectoryInfo(this.longPath); Console.WriteLine(dir.FullName); dir.Create(); this.longName = string.Empty; for (int i = 0; i < MaxFileNameLength; i++) { this.longName += "a"; } }
public void DirectoryInfoConstruction() { string fileName = "test1"; string fullPath = Path.Combine(this.testFolder.FullName, fileName); IDirectoryInfo fileInfo = Factory.CreateDirectoryInfo(fullPath); Assert.That(fileInfo, Is.Not.Null); }