Remove calls to throw helpers for validating input #80
Labels
approved
This issue has been approved by the developer
enhancement
New feature or request
net6.0
Issue applies to .NET 6.
net7.0
Issue applies to .NET 7.
Milestone
Summary
Replace all methods containing the following call:
with the following:
Rationale
On a personal level, I find it inconvenient that Rider fails to generate the
<exception>
node in XMLDoc using a throw helper, since there's no explicitthrow
statement in any immediate code path.On a more important level, however, throw helpers obscure the call stack and more vitally introduce a problem in test coverage. Since a single method call instruction is covered in all cases, coverage can falsely be reported as 100% despite no unit tests existing for a null check. A branch with an explicit
throw
, however, will guarantee that tests reach true 100% coverage by adding in tests cases for null input, without exception*.* Pun intended.
The text was updated successfully, but these errors were encountered: