11namespace EvolutionaryArchitecture . Fitnet . IntegrationTests . Reports . GenerateNewPassesPerMonthReport ;
22
3- using System ;
43using Common . TestEngine . Configuration ;
54using Common . TestEngine . IntegrationEvents . Handlers ;
65using Common . TestEngine . Time ;
@@ -25,6 +24,14 @@ public GenerateNewPassesPerMonthReportTests(WebApplicationFactory<Program> appli
2524 _applicationHttpClient = _applicationInMemoryFactory . CreateClient ( ) ;
2625 }
2726
27+ public ValueTask InitializeAsync ( ) => ValueTask . CompletedTask ;
28+
29+ public async ValueTask DisposeAsync ( )
30+ {
31+ _applicationHttpClient . Dispose ( ) ;
32+ await _applicationInMemoryFactory . DisposeAsync ( ) ;
33+ }
34+
2835 [ Theory ]
2936 [ ClassData ( typeof ( ReportTestCases ) ) ]
3037 internal async Task Given_valid_generate_new_report_request_Then_should_return_correct_data (
@@ -39,7 +46,7 @@ internal async Task Given_valid_generate_new_report_request_Then_should_return_c
3946 // Assert
4047 getReportResult . StatusCode . ShouldBe ( HttpStatusCode . OK ) ;
4148 var reportData = await getReportResult . Content . ReadFromJsonAsync < NewPassesRegistrationsPerMonthResponse > ( TestContext . Current . CancellationToken ) ;
42- await Verify ( reportData ) ;
49+ await Verify ( reportData ) . UseParameters ( passRegistrationDateRanges . Count ) ;
4350 }
4451
4552 private async Task RegisterPasses ( List < PassRegistrationDateRange > reportTestData )
@@ -58,12 +65,4 @@ private async Task RegisterPass(DateTimeOffset from, DateTimeOffset to)
5865 var @event = ContractSignedEventFaker . Create ( from , to ) ;
5966 await integrationEventHandler . Handle ( @event , CancellationToken . None ) ;
6067 }
61-
62- public ValueTask InitializeAsync ( ) => ValueTask . CompletedTask ;
63-
64- public async ValueTask DisposeAsync ( )
65- {
66- _applicationHttpClient . Dispose ( ) ;
67- await _applicationInMemoryFactory . DisposeAsync ( ) ;
68- }
6968}
0 commit comments