public void TestSetLastWriteTime() { var tempLongPathFilename = longPathDirectory.Combine(Pri.LongPath.Path.GetRandomFileName()); tempLongPathFilename.CreateDirectory(); try { var dateTime = DateTime.Now.AddDays(1); Directory.SetLastWriteTime(tempLongPathFilename, dateTime); var fi = new DirectoryInfo(tempLongPathFilename); Assert.AreEqual(fi.LastWriteTime, dateTime); } finally { Directory.Delete(tempLongPathFilename); } }