-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from AdrianJSClark/185-auth-concurrency-issues
Implement Locking for Authentication
- Loading branch information
Showing
7 changed files
with
186 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,21 +6,22 @@ namespace Aydsko.iRacingData.UnitTests; | |
internal sealed class TrackScreenshotServiceTests : MockedHttpTestBase | ||
{ | ||
// NUnit will ensure that "SetUp" runs before each test so these can all be forced to "null". | ||
private DataClient dataClient = null!; | ||
private TrackScreenshotService sut = null!; | ||
|
||
[SetUp] | ||
public async Task SetUpAsync() | ||
{ | ||
BaseSetUp(); | ||
var dataClient = new DataClient(HttpClient, | ||
new TestLogger<DataClient>(), | ||
new iRacingDataClientOptions() | ||
{ | ||
Username = "[email protected]", | ||
Password = "SuperSecretPassword", | ||
CurrentDateTimeSource = () => new DateTimeOffset(2022, 04, 05, 0, 0, 0, TimeSpan.Zero) | ||
}, | ||
new System.Net.CookieContainer()); | ||
dataClient = new DataClient(HttpClient, | ||
new TestLogger<DataClient>(), | ||
new iRacingDataClientOptions() | ||
{ | ||
Username = "[email protected]", | ||
Password = "SuperSecretPassword", | ||
CurrentDateTimeSource = () => new DateTimeOffset(2022, 04, 05, 0, 0, 0, TimeSpan.Zero) | ||
}, | ||
new System.Net.CookieContainer()); | ||
|
||
// Make use of our captured responses. | ||
await MessageHandler.QueueResponsesAsync(nameof(CapturedResponseValidationTests.GetTracksSuccessfulAsync)).ConfigureAwait(false); | ||
|
@@ -67,5 +68,14 @@ public async Task GivenSuzukaTrackId_ThenGetScreenshotsByTrackIdReturnsCorrectRe | |
Assert.That(suzukaResults, Contains.Item(new Uri("https://dqfp1ltauszrc.cloudfront.net/public/track-maps-screenshots/114_screenshots/04.jpg"))); | ||
}); | ||
} | ||
|
||
protected override void Dispose(bool disposing) | ||
{ | ||
if (disposing) | ||
{ | ||
dataClient?.Dispose(); | ||
} | ||
base.Dispose(disposing); | ||
} | ||
} | ||
#pragma warning restore CS0618 // Type or member is obsolete |
Oops, something went wrong.