Skip to content

Commit 3fa5e0f

Browse files
authored
[ST] 5. Fix unit test
1 parent 7e30252 commit 3fa5e0f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/NuGet.Jobs.Catalog2Registration.Tests/Catalog2RegistrationCommandFacts.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,13 @@ public async Task LoadsDependencyCursorsIfConfigured()
7676
"https://example/fc-2/cursor.json",
7777
};
7878

79-
var responseDate = new DateTimeOffset(2026, 1, 1, 1, 0, 30, TimeSpan.Zero);
80-
var responseContent = new StringContent($"{{\"value\": \"2026-01-01T00:00:00.0000000\",\"minIntervalBeforeToReadUpdate\":\"00:01:01\"," +
81-
$"\"updates\":[{{\"timeStamp\":\"2026-01-01T00:59:29.0000000Z\",\"value\":\"2026-01-01T00:00:00.0000000\"}}]}}");
82-
8379
HttpMessageHandler
8480
.Setup(x => x.OnSendAsync(It.IsAny<HttpRequestMessage>(), It.IsAny<CancellationToken>()))
8581
.ReturnsAsync(() => new HttpResponseMessage(HttpStatusCode.OK)
8682
{
87-
Headers = { Date = responseDate },
88-
Content = responseContent,
83+
Headers = { Date = new DateTimeOffset(2026, 1, 1, 1, 0, 30, TimeSpan.Zero) },
84+
Content = new StringContent($"{{\"value\": \"2026-01-01T00:00:00.0000000\",\"minIntervalBeforeToReadUpdate\":\"00:01:01\"," +
85+
$"\"updates\":[{{\"timeStamp\":\"2026-01-01T00:59:29.0000000Z\",\"value\":\"2026-01-01T00:00:00.0000000\"}}]}}"),
8986
});
9087

9188
await Target.ExecuteAsync();

0 commit comments

Comments
 (0)