1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

trying to fix lastwrite unit test

This commit is contained in:
kayone 2013-11-12 18:14:46 -08:00
parent c7b0810c98
commit 018b898a46

View File

@ -155,10 +155,14 @@ public void empty_folder_should_return_folder_modified_date()
[Test] [Test]
public void folder_should_return_correct_value_for_last_write() 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); TestLogger.Info("Path is: {0}", testFile);
Subject.WriteAllText(testFile, "Test"); Subject.WriteAllText(testFile, "Test");
Subject.GetLastFolderWrite(SandboxFolder).Should().BeOnOrAfter(DateTime.UtcNow.AddMinutes(-1)); Subject.GetLastFolderWrite(SandboxFolder).Should().BeOnOrAfter(DateTime.UtcNow.AddMinutes(-1));