Skip to content

Commit

Permalink
Fix tests with ThrowAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Feb 12, 2024
1 parent b97f8ff commit 028c1fd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ namespace ReportPortal.Client.IntegrationTests.Serialization
public class ModelSerialization
{
[Fact]
public void ShouldThrowExceptionIfIncorrectJson()
public async Task ShouldThrowExceptionIfIncorrectJson()
{
var json = "<abc />";
using (var reader = new MemoryStream(Encoding.UTF8.GetBytes(json)))
{
Action act = async () => await ModelSerializer.DeserializeAsync<MessageResponse>(reader);
act.Should().Throw<Exception>();
Func<Task> act = async () => await ModelSerializer.DeserializeAsync<MessageResponse>(reader);
await act.Should().ThrowAsync<Exception>();
}
}

Expand Down

0 comments on commit 028c1fd

Please sign in to comment.