Skip to content

Commit

Permalink
Resolve Data Type Error for Fuel Percentage
Browse files Browse the repository at this point in the history
Fixes: #219
  • Loading branch information
AdrianJSClark committed Sep 3, 2024
1 parent e347f94 commit 4281565
Show file tree
Hide file tree
Showing 10 changed files with 7,428 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,38 @@ public async Task GetLookupWithExpiredAuthWorksAsync()
});
}

[Test(TestOf = typeof(DataClient))]
public async Task ListHostedSessionsSuccessfulAsync()
{
await MessageHandler.QueueResponsesAsync(nameof(ListHostedSessionsSuccessfulAsync)).ConfigureAwait(false);

var response = await sut.ListHostedSessionsAsync().ConfigureAwait(false);

Assert.That(response, Is.Not.Null);
Assert.That(response!.Data, Is.Not.Null);

Assert.That(response.RateLimitRemaining, Is.EqualTo(99));
Assert.That(response.TotalRateLimit, Is.EqualTo(100));
Assert.That(response.RateLimitReset, Is.EqualTo(new DateTimeOffset(2022, 2, 10, 0, 0, 0, TimeSpan.Zero)));
Assert.That(response.DataExpires, Is.EqualTo(new DateTimeOffset(2022, 8, 27, 11, 23, 19, 507, TimeSpan.Zero)));
}

[Test(TestOf = typeof(DataClient))]
public async Task ListHostedSessionsCombinedSuccessfulAsync()
{
await MessageHandler.QueueResponsesAsync(nameof(ListHostedSessionsCombinedSuccessfulAsync)).ConfigureAwait(false);

var response = await sut.ListHostedSessionsCombinedAsync().ConfigureAwait(false);

Assert.That(response, Is.Not.Null);
Assert.That(response!.Data, Is.Not.Null);

Assert.That(response.RateLimitRemaining, Is.EqualTo(99));
Assert.That(response.TotalRateLimit, Is.EqualTo(100));
Assert.That(response.RateLimitReset, Is.EqualTo(new DateTimeOffset(2022, 2, 10, 0, 0, 0, TimeSpan.Zero)));
Assert.That(response.DataExpires, Is.EqualTo(new DateTimeOffset(2022, 8, 27, 11, 23, 19, 507, TimeSpan.Zero)));
}

protected override void Dispose(bool disposing)
{
if (disposing)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"headers": {
"x-ratelimit-remaining": "99",
"x-ratelimit-limit": "100",
"x-ratelimit-reset": "1644451200"
},
"content": {
"link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/season/list/c65c1ccc-6bbc-4f27-baa2-0a3d8e7a712c?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1658131480&Signature=pKqMTJke3llxd70qRhpjGO6HEq4%3D",
"expires": "2022-08-27T11:23:19.507Z"
}
}
Loading

0 comments on commit 4281565

Please sign in to comment.