@@ -24,12 +24,12 @@ public class ApiEndpointsTests(ApiFixture fixture) : IClassFixture<ApiFixture>
2424 [ MemberData ( nameof ( Cases ) ) ]
2525 public async Task LongestDownwardTrend ( string ? fromDate , string ? toDate , HttpStatusCode status )
2626 {
27- var result = await _fixture . Client . GetAsync ( $ "{ BaseUrl } /longestdownwardtrend?fromDate={ fromDate } &toDate={ toDate } ") ;
27+ var result = await _fixture . Client . GetAsync ( $ "{ BaseUrl } /longestdownwardtrend?fromDate={ fromDate } &toDate={ toDate } ", cancellationToken : TestContext . Current . CancellationToken ) ;
2828 result . StatusCode . ShouldBeOneOf ( status , HttpStatusCode . TooManyRequests ) ;
2929
3030 if ( result . StatusCode == HttpStatusCode . OK )
3131 {
32- var data = await result . Content . ReadFromJsonAsync < LongestDownwardTrendResponse > ( ) ;
32+ var data = await result . Content . ReadFromJsonAsync < LongestDownwardTrendResponse > ( cancellationToken : TestContext . Current . CancellationToken ) ;
3333 data . ShouldNotBeNull ( ) ;
3434 }
3535 }
@@ -38,12 +38,12 @@ public async Task LongestDownwardTrend(string? fromDate, string? toDate, HttpSta
3838 [ MemberData ( nameof ( Cases ) ) ]
3939 public async Task HighestTradingVolume ( string ? fromDate , string ? toDate , HttpStatusCode status )
4040 {
41- var result = await _fixture . Client . GetAsync ( $ "{ BaseUrl } /highestradingvolume?fromDate={ fromDate } &toDate={ toDate } ") ;
41+ var result = await _fixture . Client . GetAsync ( $ "{ BaseUrl } /highestradingvolume?fromDate={ fromDate } &toDate={ toDate } ", cancellationToken : TestContext . Current . CancellationToken ) ;
4242 result . StatusCode . ShouldBeOneOf ( status , HttpStatusCode . TooManyRequests ) ;
4343
4444 if ( result . StatusCode == HttpStatusCode . OK )
4545 {
46- var data = await result . Content . ReadFromJsonAsync < HighestTradingVolumeResponse > ( ) ;
46+ var data = await result . Content . ReadFromJsonAsync < HighestTradingVolumeResponse > ( cancellationToken : TestContext . Current . CancellationToken ) ;
4747 data . ShouldNotBeNull ( ) ;
4848 }
4949 }
@@ -52,27 +52,27 @@ public async Task HighestTradingVolume(string? fromDate, string? toDate, HttpSta
5252 [ MemberData ( nameof ( Cases ) ) ]
5353 public async Task BuyAndSell ( string ? fromDate , string ? toDate , HttpStatusCode status )
5454 {
55- var result = await _fixture . Client . GetAsync ( $ "{ BaseUrl } /buyandsell?fromDate={ fromDate } &toDate={ toDate } ") ;
55+ var result = await _fixture . Client . GetAsync ( $ "{ BaseUrl } /buyandsell?fromDate={ fromDate } &toDate={ toDate } ", cancellationToken : TestContext . Current . CancellationToken ) ;
5656 result . StatusCode . ShouldBeOneOf ( status , HttpStatusCode . TooManyRequests ) ;
5757
5858 if ( result . StatusCode == HttpStatusCode . OK )
5959 {
60- var data = await result . Content . ReadFromJsonAsync < BuyAndSellResponse > ( ) ;
60+ var data = await result . Content . ReadFromJsonAsync < BuyAndSellResponse > ( cancellationToken : TestContext . Current . CancellationToken ) ;
6161 data . ShouldNotBeNull ( ) ;
6262 }
6363 }
6464
6565 [ Fact ]
6666 public async Task Swagger ( )
6767 {
68- var result = await _fixture . Client . GetAsync ( "/" ) ;
68+ var result = await _fixture . Client . GetAsync ( "/" , cancellationToken : TestContext . Current . CancellationToken ) ;
6969 result . StatusCode . ShouldBe ( HttpStatusCode . OK ) ;
7070 }
7171
7272 [ Fact ]
7373 public async Task Health ( )
7474 {
75- var result = await _fixture . Client . GetAsync ( "/health" ) ;
75+ var result = await _fixture . Client . GetAsync ( "/health" , cancellationToken : TestContext . Current . CancellationToken ) ;
7676 result . StatusCode . ShouldBe ( HttpStatusCode . OK ) ;
7777 }
7878}
0 commit comments