@@ -38,8 +38,8 @@ public async Task BundleService_TwoFilesProvided_UploadSuccessfullAfterTreeAttem
3838 } ;
3939
4040 codeClientMock
41- . Setup ( codeClient => codeClient . CheckBundleAsync ( bundle . Id , It . IsAny < CancellationToken > ( ) ) . Result )
42- . Returns ( bundleDto ) ;
41+ . Setup ( codeClient => codeClient . CheckBundleAsync ( bundle . Id , It . IsAny < CancellationToken > ( ) ) )
42+ . ReturnsAsync ( bundleDto ) ;
4343
4444 string fileContent1 = TestResource . GetFileContent ( "app1.js" ) ;
4545 string fileContent2 = TestResource . GetFileContent ( "app2.js" ) ;
@@ -56,8 +56,8 @@ public async Task BundleService_TwoFilesProvided_UploadSuccessfullAfterTreeAttem
5656 var mockMethodCallsCount = 1 ;
5757
5858 codeClientMock
59- . Setup ( codeClient => codeClient . ExtendBundleAsync ( bundle . Id , It . IsAny < Dictionary < string , CodeFileDto > > ( ) , It . IsAny < CancellationToken > ( ) ) . Result )
60- . Returns ( new BundleResponseDto ( ) )
59+ . Setup ( codeClient => codeClient . ExtendBundleAsync ( bundle . Id , It . IsAny < Dictionary < string , CodeFileDto > > ( ) , It . IsAny < CancellationToken > ( ) ) )
60+ . ReturnsAsync ( new BundleResponseDto ( ) )
6161 . Callback < string , IDictionary < string , CodeFileDto > , CancellationToken > ( ( str , codeFilesDict , cancellationToken ) =>
6262 {
6363 mockMethodCallsCount ++ ;
@@ -103,8 +103,8 @@ public async Task BundleService_ActiveBundleProvided_CheckBundleSuccessfullAsync
103103 var dummyBundleDto = new BundleResponseDto { Hash = "dummy id" } ;
104104
105105 codeClientMock
106- . Setup ( codeClient => codeClient . CheckBundleAsync ( dummyBundleDto . Hash , It . IsAny < CancellationToken > ( ) ) . Result )
107- . Returns ( dummyBundleDto ) ;
106+ . Setup ( codeClient => codeClient . CheckBundleAsync ( dummyBundleDto . Hash , It . IsAny < CancellationToken > ( ) ) )
107+ . ReturnsAsync ( dummyBundleDto ) ;
108108
109109 var bundleService = new BundleService ( codeClientMock . Object ) ;
110110
@@ -142,8 +142,8 @@ public async Task BundleService_ThreeFilesProvided_UploadedSuccessfullyAsync()
142142 var dummyBundleDto = new BundleResponseDto { Hash = "dummy id" } ;
143143
144144 codeClientMock
145- . Setup ( codeClient => codeClient . CreateBundleAsync ( It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < CancellationToken > ( ) ) . Result )
146- . Returns ( dummyBundleDto ) ;
145+ . Setup ( codeClient => codeClient . CreateBundleAsync ( It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < CancellationToken > ( ) ) )
146+ . ReturnsAsync ( dummyBundleDto ) ;
147147
148148 var bundleService = new BundleService ( codeClientMock . Object ) ;
149149
@@ -159,8 +159,8 @@ public async Task BundleService_ThreeFilesProvided_UploadedSuccessfullyAsync()
159159 fileHashToContentDict . Add ( filePath3 , ( fileHash3 , fileContent3 ) ) ;
160160
161161 codeClientMock
162- . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , CodeFileDto > > ( ) , It . IsAny < CancellationToken > ( ) ) . Result )
163- . Returns ( new BundleResponseDto ( ) ) ;
162+ . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , CodeFileDto > > ( ) , It . IsAny < CancellationToken > ( ) ) )
163+ . ReturnsAsync ( new BundleResponseDto ( ) ) ;
164164
165165 bool isSuccess = await bundleService . UploadFilesAsync ( createdBundle . Id , fileHashToContentDict , ( state , progress ) => { } , 200 ) ;
166166
@@ -191,8 +191,8 @@ public async Task BundleService_TwoFilesAndRemoveOneFileProvided_ExtendBundleChe
191191 var dummyBundleDto = new BundleResponseDto { Hash = "dummy id" } ;
192192
193193 codeClientMock
194- . Setup ( codeClient => codeClient . CreateBundleAsync ( filePathToHashDict , It . IsAny < CancellationToken > ( ) ) . Result )
195- . Returns ( dummyBundleDto ) ;
194+ . Setup ( codeClient => codeClient . CreateBundleAsync ( filePathToHashDict , It . IsAny < CancellationToken > ( ) ) )
195+ . ReturnsAsync ( dummyBundleDto ) ;
196196
197197 var firstBundleDto = await bundleService . CreateBundleAsync ( filePathToHashDict ) ;
198198
@@ -215,8 +215,8 @@ public async Task BundleService_TwoFilesAndRemoveOneFileProvided_ExtendBundleChe
215215 } ;
216216
217217 codeClientMock
218- . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < List < string > > ( ) , It . IsAny < CancellationToken > ( ) ) . Result )
219- . Returns ( resultExtendBundleDto ) ;
218+ . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < List < string > > ( ) , It . IsAny < CancellationToken > ( ) ) )
219+ . ReturnsAsync ( resultExtendBundleDto ) ;
220220
221221 var uploadedBundle = await bundleService . ExtendBundleAsync ( firstBundleDto . Id , extendFilePathToHashDict , filesToRemovePaths , 200 ) ;
222222
@@ -247,8 +247,8 @@ public async Task BundleService_FiveFilesProvided_ExtendBundleChecksPassAsync()
247247 var dummyBundleDto = new BundleResponseDto { Hash = "dummy id" } ;
248248
249249 codeClientMock
250- . Setup ( codeClient => codeClient . CreateBundleAsync ( filePathToHashDict , It . IsAny < CancellationToken > ( ) ) . Result )
251- . Returns ( dummyBundleDto ) ;
250+ . Setup ( codeClient => codeClient . CreateBundleAsync ( filePathToHashDict , It . IsAny < CancellationToken > ( ) ) )
251+ . ReturnsAsync ( dummyBundleDto ) ;
252252
253253 var firstBundleDto = await bundleService . CreateBundleAsync ( filePathToHashDict ) ;
254254
@@ -273,8 +273,8 @@ public async Task BundleService_FiveFilesProvided_ExtendBundleChecksPassAsync()
273273 } ;
274274
275275 codeClientMock
276- . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < List < string > > ( ) , It . IsAny < CancellationToken > ( ) ) . Result )
277- . Returns ( resultExtendBundleDto ) ;
276+ . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < List < string > > ( ) , It . IsAny < CancellationToken > ( ) ) )
277+ . ReturnsAsync ( resultExtendBundleDto ) ;
278278
279279 var extendedBundle = await bundleService . ExtendBundleAsync ( firstBundleDto . Id , extendFilePathToHashDict , new List < string > ( ) , 150 ) ;
280280
@@ -305,8 +305,8 @@ public async Task BundleService_FiveFilesProvided_ProcessExtendLargeBundleChecks
305305 var dummyBundleDto = new BundleResponseDto { Hash = "dummy id" } ;
306306
307307 codeClientMock
308- . Setup ( codeClient => codeClient . CreateBundleAsync ( filePathToHashDict , It . IsAny < CancellationToken > ( ) ) . Result )
309- . Returns ( dummyBundleDto ) ;
308+ . Setup ( codeClient => codeClient . CreateBundleAsync ( filePathToHashDict , It . IsAny < CancellationToken > ( ) ) )
309+ . ReturnsAsync ( dummyBundleDto ) ;
310310
311311 var firstBundleDto = await bundleService . CreateBundleAsync ( filePathToHashDict ) ;
312312
@@ -331,8 +331,8 @@ public async Task BundleService_FiveFilesProvided_ProcessExtendLargeBundleChecks
331331 } ;
332332
333333 codeClientMock
334- . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < List < string > > ( ) , It . IsAny < CancellationToken > ( ) ) . Result )
335- . Returns ( resultExtendBundleDto ) ;
334+ . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < List < string > > ( ) , It . IsAny < CancellationToken > ( ) ) )
335+ . ReturnsAsync ( resultExtendBundleDto ) ;
336336
337337 var extendedBundle = await bundleService . ProcessExtendLargeBundleAsync ( firstBundleDto . Id , extendFilePathToHashDict , null , 150 ) ;
338338
@@ -366,8 +366,8 @@ public async Task BundleService_FiftyFilesProvided_CreateBundleChecksPassAsync()
366366 var dummyBundleDto = new BundleResponseDto { Hash = "dummy id" } ;
367367
368368 codeClientMock
369- . Setup ( codeClient => codeClient . CreateBundleAsync ( It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < CancellationToken > ( ) ) . Result )
370- . Returns ( dummyBundleDto ) ;
369+ . Setup ( codeClient => codeClient . CreateBundleAsync ( It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < CancellationToken > ( ) ) )
370+ . ReturnsAsync ( dummyBundleDto ) ;
371371
372372 var resultExtendBundleDto = new BundleResponseDto
373373 {
@@ -376,8 +376,8 @@ public async Task BundleService_FiftyFilesProvided_CreateBundleChecksPassAsync()
376376 } ;
377377
378378 codeClientMock
379- . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < List < string > > ( ) , It . IsAny < CancellationToken > ( ) ) . Result )
380- . Returns ( resultExtendBundleDto ) ;
379+ . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < List < string > > ( ) , It . IsAny < CancellationToken > ( ) ) )
380+ . ReturnsAsync ( resultExtendBundleDto ) ;
381381
382382 var bundleDto = await bundleService . CreateBundleAsync ( filePathToHashDict , 150 ) ;
383383
@@ -412,8 +412,8 @@ public async Task BundleService_ThreeFilesProvided_ProcessCreateLargeBundleCheck
412412 var dummyBundleDto = new BundleResponseDto { Hash = "dummy id" } ;
413413
414414 codeClientMock
415- . Setup ( codeClient => codeClient . CreateBundleAsync ( It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < CancellationToken > ( ) ) . Result )
416- . Returns ( dummyBundleDto ) ;
415+ . Setup ( codeClient => codeClient . CreateBundleAsync ( It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < CancellationToken > ( ) ) )
416+ . ReturnsAsync ( dummyBundleDto ) ;
417417
418418 var resultExtendBundleDto = new BundleResponseDto
419419 {
@@ -422,8 +422,8 @@ public async Task BundleService_ThreeFilesProvided_ProcessCreateLargeBundleCheck
422422 } ;
423423
424424 codeClientMock
425- . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < List < string > > ( ) , It . IsAny < CancellationToken > ( ) ) . Result )
426- . Returns ( resultExtendBundleDto ) ;
425+ . Setup ( codeClient => codeClient . ExtendBundleAsync ( dummyBundleDto . Hash , It . IsAny < Dictionary < string , string > > ( ) , It . IsAny < List < string > > ( ) , It . IsAny < CancellationToken > ( ) ) )
426+ . ReturnsAsync ( resultExtendBundleDto ) ;
427427
428428 var bundleDto = await bundleService . ProcessCreateLargeBundleAsync ( filePathToHashDict , 175 ) ;
429429
0 commit comments