Skip to content

Commit

Permalink
test: check DateTime using InRange.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmds committed Jun 30, 2023
1 parent 527bc0a commit 06effa4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public async Task SetsLastModifiedTimeOnExtractedDirectories()
for (int i = 0; i < extractedDirectories.Length; i++)
{
Assert.Equal(Path.GetFileName(directories[i].FullName), Path.GetFileName(extractedDirectories[i]));
Assert.Equal(Directory.GetLastWriteTime(extractedDirectories[i]).Year, dt[i].Year);
Assert.InRange(Directory.GetLastWriteTime(extractedDirectories[i]).Ticks, dt[i].AddSeconds(-3).Ticks, dt[i].AddSeconds(3).Ticks); // include some slop for filesystem granularity
}
}

Expand Down

0 comments on commit 06effa4

Please sign in to comment.