Skip to content

Commit

Permalink
#1924 Fix Throw Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
delager authored and kbeaugrand committed Jun 1, 2023
1 parent adc3aba commit d55345e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public async Task ExecuteNewDeviceWithAmazonIotExceptionSkipped()
.ReturnsAsync(thingsListing);

_ = this.amazonIoTClient.Setup(client => client.DescribeThingAsync(It.IsAny<DescribeThingRequest>(), It.IsAny<CancellationToken>()))
.ThrowsAsync(new AmazonIoTException(""));
.Throws(new AmazonIoTException(""));

_ = this.mockDeviceRepository.Setup(x => x.GetAllAsync(It.IsAny<Expression<Func<Device, bool>>>(), It.IsAny<CancellationToken>(), d => d.Tags, d => d.Labels))
.ReturnsAsync(new List<Device>());
Expand Down Expand Up @@ -589,7 +589,7 @@ public async Task ExecuteNewDeviceWithAmazonIotDataExceptionSkipped()
.Returns(expectedDeviceModel);

_ = this.amazonIoTDataClient.Setup(client => client.GetThingShadowAsync(It.IsAny<GetThingShadowRequest>(), It.IsAny<CancellationToken>()))
.ThrowsAsync(new AmazonIotDataException(""));
.Throws(new AmazonIotDataException(""));

_ = this.mockDeviceRepository.Setup(x => x.GetAllAsync(It.IsAny<Expression<Func<Device, bool>>>(), It.IsAny<CancellationToken>(), d => d.Tags, d => d.Labels))
.ReturnsAsync(new List<Device>());
Expand Down

0 comments on commit d55345e

Please sign in to comment.