Is there a way to flag which class-level Moq setups are never called?
We’ve been using xUnit and Moq for our (C#) unit tests for nearly 10 years. Over that time, as you can imagine, our code has changed an awful lot, and one of the results is that we now have a whole lot of “stale” Moq setup calls in our unit tests. Maybe 5 years ago, that setup was required, but enough has changed with the class under test so that particular Moq setup is no longer needed. In my testing, depending on the test class, maybe about a third of our setups are no longer needed. They’re not really causing any direct problems, but they add a lot of clutter and cruft that I’d really like to get rid of.