You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 10, 2025. It is now read-only.
Many of the unit tests are using ThrowsAsync<> incorrectly, in the form of:
[Fact]publicvoidTestTheThing(){proxyClient=new();_=Assert.ThrowsAsync<ArgumentExpection>(async()=>/* do something with the client */);}
Unfortunately, failing to await the call to Assert.ThrowsAsync will cause the test harness to only check that something deriving from Exception came back, not the actual specified type. Relevant GH issue.
In addition to the above, fixing these tests will result in additional breaks, in some cases. Assert.ThrowsAsync will look for the exact type that was specified. If the test is looking for ArgumentExpection but the logic under test throws ArgumentNullException, the test will fail.
Many of the unit tests are using
ThrowsAsync<>incorrectly, in the form of:Unfortunately, failing to await the call to Assert.ThrowsAsync will cause the test harness to only check that something deriving from
Exceptioncame back, not the actual specified type. Relevant GH issue.In addition to the above, fixing these tests will result in additional breaks, in some cases. Assert.ThrowsAsync will look for the exact type that was specified. If the test is looking for
ArgumentExpectionbut the logic under test throwsArgumentNullException, the test will fail.