@@ -118,9 +118,9 @@ public void ListOwnershipLogsErrorOnException()
118118 var mockLog = new Mock < BlobEventStoreEventSource > ( ) ;
119119 target . Logger = mockLog . Object ;
120120
121- Assert . ThrowsAsync < RequestFailedException > ( async ( ) => await target . ListOwnershipAsync ( FullyQualifiedNamespace , EventHubName , ConsumerGroup , new CancellationToken ( ) ) ) ;
121+ Assert . That ( async ( ) => await target . ListOwnershipAsync ( FullyQualifiedNamespace , EventHubName , ConsumerGroup , new CancellationToken ( ) ) , Throws . InstanceOf < RequestFailedException > ( ) ) ;
122122
123- mockLog . Verify ( m => m . ListOwnershipError ( FullyQualifiedNamespace , EventHubName , ConsumerGroup , It . Is < string > ( e => e . Contains ( "RequestFailedException" ) ) ) ) ;
123+ mockLog . Verify ( m => m . ListOwnershipError ( FullyQualifiedNamespace , EventHubName , ConsumerGroup , ex . Message ) ) ;
124124 }
125125
126126 /// <summary>
@@ -311,7 +311,7 @@ public void ClaimOwnershipForMissingPartitionThrowsAndLogsOwnershipNotClaimable(
311311 var mockLog = new Mock< BlobEventStoreEventSource > ( ) ;
312312 target . Logger = mockLog . Object;
313313
314- Assert . ThrowsAsync < RequestFailedException > ( async ( ) => await target . ClaimOwnershipAsync ( partitionOwnership , new CancellationToken ( ) ) ) ;
314+ Assert . That ( async ( ) => await target . ClaimOwnershipAsync ( partitionOwnership , new CancellationToken ( ) ) , Throws . InstanceOf < RequestFailedException > ( ) ) ;
315315 }
316316
317317 /// <summary>
@@ -490,7 +490,7 @@ public void ListCheckpointsForMissingPartitionThrowsAndLogsOwnershipNotClaimable
490490 var mockLog = new Mock< BlobEventStoreEventSource > ( ) ;
491491 target . Logger = mockLog . Object ;
492492
493- Assert. ThrowsAsync < RequestFailedException > ( async ( ) => await target . ListCheckpointsAsync ( FullyQualifiedNamespace , EventHubName , ConsumerGroup , new CancellationToken ( ) ) ) ;
493+ Assert. That ( async ( ) => await target . ListCheckpointsAsync ( FullyQualifiedNamespace , EventHubName , ConsumerGroup , new CancellationToken ( ) ) , Throws . InstanceOf < RequestFailedException > ( ) ) ;
494494 mockLog. Verify ( m => m . ListCheckpointsError ( FullyQualifiedNamespace , EventHubName , ConsumerGroup , ex . Message ) ) ;
495495 }
496496
@@ -574,9 +574,9 @@ public void UpdateCheckpointForMissingCheckpointThrowsAndLogsCheckpointUpdateErr
574574 var mockLog = new Mock < BlobEventStoreEventSource > ( ) ;
575575 target . Logger = mockLog . Object ;
576576
577- Assert . ThrowsAsync < RequestFailedException > ( async ( ) => await target . UpdateCheckpointAsync ( checkpoint , new EventData ( Array . Empty < byte > ( ) ) , new CancellationToken ( ) ) ) ;
577+ Assert . That ( async ( ) => await target . UpdateCheckpointAsync ( checkpoint , new EventData ( Array . Empty < byte > ( ) ) , new CancellationToken ( ) ) , Throws . InstanceOf < RequestFailedException > ( ) ) ;
578578
579- mockLog . Verify ( m => m . UpdateCheckpointError ( PartitionId , FullyQualifiedNamespace , EventHubName , ConsumerGroup , It . Is < string > ( s => s . Contains ( BlobErrorCode . ContainerNotFound . ToString ( ) ) ) ) ) ;
579+ mockLog . Verify ( m => m . UpdateCheckpointError ( PartitionId , FullyQualifiedNamespace , EventHubName , ConsumerGroup , ex . Message ) ) ;
580580 }
581581
582582 /// <summary>
0 commit comments