Skip to content

Commit

Permalink
Merge pull request #173 from AdrianJSClark/dennis-adds-GetCustomerLea…
Browse files Browse the repository at this point in the history
…gueSessionsAsync

Add `GetCustomerLeagueSessionsAsync`
  • Loading branch information
AdrianJSClark committed Apr 9, 2023
2 parents c271675 + 138fc1e commit 4f98acf
Show file tree
Hide file tree
Showing 11 changed files with 19,881 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,22 @@ public async Task GetRaceGuideSuccessfulAsync()
Assert.That(raceGuideResponse.DataExpires, Is.EqualTo(new DateTimeOffset(2022, 8, 27, 11, 23, 19, 507, TimeSpan.Zero)));
}

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

var countryResponse = await sut.GetCustomerLeagueSessionsAsync().ConfigureAwait(false);

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

Assert.That(countryResponse.RateLimitRemaining, Is.EqualTo(99));
Assert.That(countryResponse.TotalRateLimit, Is.EqualTo(100));
Assert.That(countryResponse.RateLimitReset, Is.EqualTo(new DateTimeOffset(2022, 2, 10, 0, 0, 0, TimeSpan.Zero)));
Assert.That(countryResponse.DataExpires, Is.EqualTo(new DateTimeOffset(2023, 4, 8, 20, 28, 49, 471, TimeSpan.Zero)));
}

[Test(TestOf = typeof(DataClient))]
public async Task GetCountriesSuccessfulAsync()
{
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/league/cust_league_sessions/bcfec173-310c-4d21-bb20-ea019c676113?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1680985284&Signature=LzOPNlJW2ERiatDbm1e%2Bw9qCpOQ%3D",
"expires": "2023-04-08T20:28:49.471Z"
}
}

0 comments on commit 4f98acf

Please sign in to comment.