@@ -81,8 +81,9 @@ public async Task FileProcessingManager_GetFileImportLogs_NoMerchantId_ImportLog
8181 new Mock < IAggregateRepository < FileAggregate , DomainEvent > > ( ) ;
8282 FileProcessorManager manager = new FileProcessorManager ( fileProfiles , contextFactory . Object , modelFactory , fileAggregateRepository . Object ) ;
8383
84- List < FileImportLog > importLogs = await manager . GetFileImportLogs ( TestData . EstateId , TestData . ImportLogStartDate , TestData . ImportLogEndDate , null , CancellationToken . None ) ;
85-
84+ Result < List < FileImportLog > > getFileImportLogsResult = await manager . GetFileImportLogs ( TestData . EstateId , TestData . ImportLogStartDate , TestData . ImportLogEndDate , null , CancellationToken . None ) ;
85+ getFileImportLogsResult . IsSuccess . ShouldBeTrue ( ) ;
86+ List < FileImportLog > importLogs = getFileImportLogsResult . Data ;
8687 this . VerifyImportLogs ( TestData . FileImportLogs , importLogs ) ;
8788 }
8889
@@ -164,7 +165,10 @@ public async Task FileProcessingManager_GetFileImportLog_WithMerchantId_ImportLo
164165 [ Fact ]
165166 public async Task FileProcessingManager_GetFile_FileReturned ( )
166167 {
167- List < FileProfile > fileProfiles = new List < FileProfile > ( ) ;
168+ List < FileProfile > fileProfiles = new List < FileProfile >
169+ {
170+ TestData . FileProfile
171+ } ;
168172 var context = await this . GetContext ( Guid . NewGuid ( ) . ToString ( "N" ) ) ;
169173 var contextFactory = this . CreateMockContextFactory ( ) ;
170174 contextFactory . Setup ( c => c . GetContext ( It . IsAny < Guid > ( ) , It . IsAny < String > ( ) , It . IsAny < CancellationToken > ( ) ) ) . ReturnsAsync ( context ) ;
@@ -181,7 +185,6 @@ public async Task FileProcessingManager_GetFile_FileReturned()
181185 this . VerifyFile ( TestData . GetFileAggregateWithLines ( ) , fileDetails ) ;
182186 fileDetails . Data . MerchantName . ShouldBeNull ( ) ;
183187 fileDetails . Data . UserEmailAddress . ShouldBeNull ( ) ;
184- fileDetails . Data . FileProfileName . ShouldBeNull ( ) ;
185188 }
186189
187190 [ Fact ]
@@ -206,7 +209,10 @@ public async Task FileProcessingManager_GetFile_FileAggregateFailed_ErrorReturne
206209 [ Fact ]
207210 public async Task FileProcessingManager_GetFile_FileReturnedWithMerchantName ( )
208211 {
209- List < FileProfile > fileProfiles = new List < FileProfile > ( ) ;
212+ List < FileProfile > fileProfiles = new List < FileProfile >
213+ {
214+ TestData . FileProfile
215+ } ;
210216 var context = await this . GetContext ( Guid . NewGuid ( ) . ToString ( "N" ) ) ;
211217 context . Merchants . Add ( new Merchant
212218 {
@@ -235,7 +241,10 @@ public async Task FileProcessingManager_GetFile_FileReturnedWithMerchantName()
235241 [ Fact ]
236242 public async Task FileProcessingManager_GetFile_FileReturnedWithUserEmailAddress ( )
237243 {
238- List < FileProfile > fileProfiles = new List < FileProfile > ( ) ;
244+ List < FileProfile > fileProfiles = new List < FileProfile >
245+ {
246+ TestData . FileProfile
247+ } ;
239248 var context = await this . GetContext ( Guid . NewGuid ( ) . ToString ( "N" ) ) ;
240249 context . EstateSecurityUsers . Add ( new EstateSecurityUser ( )
241250 {
@@ -380,19 +389,19 @@ private void VerifyImportLog(TransactionProcessor.Database.Entities.FileImportLo
380389 }
381390 }
382391
383- private Mock < Shared . EntityFramework . IDbContextFactory < EstateManagementGenericContext > > CreateMockContextFactory ( )
392+ private Mock < Shared . EntityFramework . IDbContextFactory < EstateManagementContext > > CreateMockContextFactory ( )
384393 {
385- return new Mock < Shared . EntityFramework . IDbContextFactory < EstateManagementGenericContext > > ( ) ;
394+ return new Mock < Shared . EntityFramework . IDbContextFactory < EstateManagementContext > > ( ) ;
386395 }
387396
388- private async Task < EstateManagementGenericContext > GetContext ( String databaseName )
397+ private async Task < EstateManagementContext > GetContext ( String databaseName )
389398 {
390- EstateManagementGenericContext context = null ;
399+ EstateManagementContext context = null ;
391400
392- DbContextOptionsBuilder < EstateManagementGenericContext > builder = new DbContextOptionsBuilder < EstateManagementGenericContext > ( )
401+ DbContextOptionsBuilder < EstateManagementContext > builder = new DbContextOptionsBuilder < EstateManagementContext > ( )
393402 . UseInMemoryDatabase ( databaseName )
394403 . ConfigureWarnings ( w => w . Ignore ( InMemoryEventId . TransactionIgnoredWarning ) ) ;
395- context = new EstateManagementSqlServerContext ( builder . Options ) ;
404+ context = new EstateManagementContext ( builder . Options ) ;
396405
397406 return context ;
398407 }
0 commit comments