Update FluentAssertions

(cherry picked from commit 951a9ade00d7c9105f03608cb598450d706b826f)
This commit is contained in:
Stepan Goremykin
2023-03-18 23:05:46 +01:00
committed by Bogdan
parent 26afcb0071
commit 1e4c67dcdb
6 changed files with 16 additions and 14 deletions

View File

@@ -13,6 +13,7 @@ namespace NzbDrone.Core.Test.Datastore
[TestFixture]
public class BasicRepositoryFixture : DbTest<BasicRepository<ScheduledTask>, ScheduledTask>
{
private readonly TimeSpan _dateTimePrecision = TimeSpan.FromMilliseconds(20);
private List<ScheduledTask> _basicList;
[SetUp]
@@ -20,7 +21,7 @@ namespace NzbDrone.Core.Test.Datastore
{
AssertionOptions.AssertEquivalencyUsing(options =>
{
options.Using<DateTime>(ctx => ctx.Subject.Should().BeCloseTo(ctx.Expectation.ToUniversalTime())).WhenTypeIs<DateTime>();
options.Using<DateTime>(ctx => ctx.Subject.Should().BeCloseTo(ctx.Expectation.ToUniversalTime(), _dateTimePrecision)).WhenTypeIs<DateTime>();
return options;
});