trying to fix lastwrite unit test

This commit is contained in:
kayone 2013-11-12 18:14:46 -08:00
parent c7b0810c98
commit 018b898a46
1 changed files with 5 additions and 1 deletions

View File

@ -155,10 +155,14 @@ namespace NzbDrone.Common.Test.DiskProviderTests
[Test]
public void folder_should_return_correct_value_for_last_write()
{
var testFile = GetTestFilePath();
var testDir = Path.Combine(SandboxFolder, "LastWrite");
var testFile = Path.Combine(testDir, Path.GetRandomFileName());
Directory.CreateDirectory(testDir);
TestLogger.Info("Path is: {0}", testFile);
Subject.WriteAllText(testFile, "Test");
Subject.GetLastFolderWrite(SandboxFolder).Should().BeOnOrAfter(DateTime.UtcNow.AddMinutes(-1));