File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,11 @@ public async Task BasedIteration_WhenNotCallMethodRead_ThrowException()
4040 }
4141
4242 [ Fact ]
43- public void CreateYdbDataReader_WhenAbortedStatus_ThrowException ( )
43+ public async Task CreateYdbDataReader_WhenAbortedStatus_ThrowException ( )
4444 {
4545 var statuses = new List < Status > ( ) ;
46- Assert . Equal ( "Status: Aborted" , Assert . Throws < YdbException > (
47- ( ) => YdbDataReader . CreateYdbDataReader ( SingleEnumeratorFailed , statuses . Add ) . GetAwaiter ( ) . GetResult ( ) )
46+ Assert . Equal ( "Status: Aborted" , ( await Assert . ThrowsAsync < YdbException > (
47+ ( ) => YdbDataReader . CreateYdbDataReader ( SingleEnumeratorFailed , statuses . Add ) ) )
4848 . Message ) ;
4949 Assert . Single ( statuses ) ;
5050 Assert . Equal ( StatusCode . Aborted , statuses [ 0 ] . StatusCode ) ;
Original file line number Diff line number Diff line change @@ -96,8 +96,7 @@ public async Task GetChannel_WhenRaceCondition_ChannelIsCreatedOneTime(bool useA
9696 . Select ( endpoint => Task . Run ( ( ) => _channelPool . GetChannel ( endpoint ) ) )
9797 . ToArray ( ) ;
9898
99- // ReSharper disable once CoVariantArrayConversion
100- Task . WaitAll ( tasks ) ;
99+ await Task . WhenAll ( tasks ) ;
101100
102101 _mockChannelFactory . Verify (
103102 channelPool => channelPool . CreateChannel ( It . IsAny < string > ( ) ) , Times . Exactly ( endpointCount )
Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ public void ListType()
327327 var elements = value . GetTuple ( ) ;
328328 Assert . Equal ( 2 , elements . Count ) ;
329329
330- Assert . Equal ( 0 , elements [ 0 ] . GetList ( ) . Count ) ;
330+ Assert . Empty ( elements [ 0 ] . GetList ( ) ) ;
331331 Assert . Equal ( new [ ] { "one" , "two" } , elements [ 1 ] . GetList ( ) . Select ( v => ( string ) v ! ) ) ;
332332 }
333333
@@ -340,9 +340,9 @@ public void TupleType()
340340 } ) ;
341341
342342 var elements = value . GetTuple ( ) ;
343- Assert . Equal ( 1 , elements . Count ) ;
343+ Assert . Single ( elements ) ;
344344
345- Assert . Equal ( 0 , elements [ 0 ] . GetTuple ( ) . Count ) ;
345+ Assert . Empty ( elements [ 0 ] . GetTuple ( ) ) ;
346346 }
347347
348348 [ Fact ]
@@ -361,7 +361,7 @@ public void StructType()
361361 var elements = value . GetTuple ( ) ;
362362 Assert . Equal ( 2 , elements . Count ) ;
363363
364- Assert . Equal ( 0 , elements [ 0 ] . GetStruct ( ) . Count ) ;
364+ Assert . Empty ( elements [ 0 ] . GetStruct ( ) ) ;
365365
366366 var s = elements [ 1 ] . GetStruct ( ) ;
367367 Assert . Equal ( 2 , s . Count ) ;
You can’t perform that action at this time.
0 commit comments