Skip to content

Commit 21253f6

Browse files
committed
chore: reduce fluent assertion usage
Signed-off-by: Vincent Biret <[email protected]>
1 parent 4dfc9b8 commit 21253f6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,12 +1390,8 @@ public async Task ParseDocumentWithEmptyPathsSucceeds()
13901390
public async Task ParseDocumentWithExampleReferencesPasses()
13911391
{
13921392
// Act & Assert: Ensure no NullReferenceException is thrown
1393-
Func<Task> act = async () =>
1394-
{
1395-
await OpenApiDocument.LoadAsync(System.IO.Path.Combine(SampleFolderPath, "docWithExampleReferences.yaml"));
1396-
};
1397-
1398-
await act.Should().NotThrowAsync<NullReferenceException>();
1393+
var result = await OpenApiDocument.LoadAsync(Path.Combine(SampleFolderPath, "docWithExampleReferences.yaml"));
1394+
Assert.Empty(result.Diagnostic.Errors);
13991395
}
14001396
}
14011397
}

0 commit comments

Comments
 (0)