Skip to content

Commit

Permalink
Uncomment a test
Browse files Browse the repository at this point in the history
  • Loading branch information
artakabraham committed May 21, 2024
1 parent a86e119 commit 5f02eb4
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions RateLimiter.Tests/RateLimiterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ public async Task Get_CalledThreeTimesWithinTenSeconds_ReturnsTooManyRequestsOnF
Assert.AreEqual(HttpStatusCode.TooManyRequests, tooManyRequestsResult.StatusCode);
}

//[Test]
//public async Task Get_CalledThreeTimesForLongTimeSpan_ReturnsOk()
//{
// for (int i = 0; i < 3; i++)
// {
// await MakeApiCall();
// await Task.Delay(5000);
// }
[Test]
public async Task Get_CalledThreeTimesForLongTimeSpan_ReturnsOk()
{
for (int i = 0; i < 3; i++)
{
await MakeApiCall();
await Task.Delay(5000);
}

// var tooManyRequestsResult = await MakeApiCall();
var tooManyRequestsResult = await MakeApiCall();

// Assert.IsInstanceOf<HttpResponseMessage>(tooManyRequestsResult);
// Assert.AreEqual(HttpStatusCode.OK, tooManyRequestsResult.StatusCode);
//}
Assert.IsInstanceOf<HttpResponseMessage>(tooManyRequestsResult);
Assert.AreEqual(HttpStatusCode.OK, tooManyRequestsResult.StatusCode);
}

private static async Task<HttpResponseMessage> MakeApiCall()
{
Expand Down

0 comments on commit 5f02eb4

Please sign in to comment.