File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 5
5
using Microsoft . Extensions . Configuration ;
6
6
using System ;
7
7
using Xunit . Abstractions ;
8
+ using MatthiWare . FinancialModelingPrep . Abstractions . Http ;
9
+ using MatthiWare . FinancialModelingPrep . Core . Http ;
8
10
9
11
namespace Tests
10
12
{
@@ -16,6 +18,7 @@ public abstract class TestingBase
16
18
private static readonly IConfigurationRoot ConfigurationRoot ;
17
19
18
20
private static FinancialModelingPrepOptions testingOptions ;
21
+ private static IRequestRateLimiter sharedRateLimiter ;
19
22
20
23
static TestingBase ( )
21
24
{
@@ -24,6 +27,7 @@ static TestingBase()
24
27
ConfigurationRoot = config . Build ( ) ;
25
28
26
29
testingOptions = CreateTestingOptions ( ) ;
30
+ sharedRateLimiter = new RequestRateLimiter ( testingOptions ) ;
27
31
}
28
32
29
33
public TestingBase ( ITestOutputHelper testOutput )
@@ -39,6 +43,7 @@ public TestingBase(ITestOutputHelper testOutput)
39
43
builder . SetMinimumLevel ( LogLevel . Debug ) ;
40
44
} ) ;
41
45
46
+ this . Services . AddSingleton ( sharedRateLimiter ) ;
42
47
this . Services . AddFinancialModelingPrepApiClient ( testingOptions ) ;
43
48
44
49
Build ( ) ;
You can’t perform that action at this time.
0 commit comments