mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-27 10:21:14 +00:00
[AZ-1126] Migrate capturedAt to DateTimeOffset
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,7 +11,7 @@ namespace SatelliteProvider.Tests.Validators;
|
||||
public class UavTileBatchMetadataPayloadValidatorTests
|
||||
{
|
||||
private readonly UavTileBatchMetadataPayloadValidator _validator;
|
||||
private readonly DateTime _now;
|
||||
private readonly DateTimeOffset _now;
|
||||
|
||||
public UavTileBatchMetadataPayloadValidatorTests()
|
||||
{
|
||||
@@ -22,7 +22,7 @@ public class UavTileBatchMetadataPayloadValidatorTests
|
||||
MaxAgeDays = 7,
|
||||
CapturedAtFutureSkewSeconds = 30,
|
||||
});
|
||||
_now = new DateTime(2026, 5, 22, 12, 0, 0, DateTimeKind.Utc);
|
||||
_now = new DateTimeOffset(2026, 5, 22, 12, 0, 0, TimeSpan.Zero);
|
||||
_validator = new UavTileBatchMetadataPayloadValidator(config, new FixedTimeProvider(_now));
|
||||
}
|
||||
|
||||
@@ -96,8 +96,8 @@ public class UavTileBatchMetadataPayloadValidatorTests
|
||||
|
||||
private sealed class FixedTimeProvider : TimeProvider
|
||||
{
|
||||
private readonly DateTime _utcNow;
|
||||
public FixedTimeProvider(DateTime utcNow) => _utcNow = utcNow;
|
||||
public override DateTimeOffset GetUtcNow() => new(_utcNow, TimeSpan.Zero);
|
||||
private readonly DateTimeOffset _utcNow;
|
||||
public FixedTimeProvider(DateTimeOffset utcNow) => _utcNow = utcNow;
|
||||
public override DateTimeOffset GetUtcNow() => _utcNow;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user