Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Audits .NET test mocks, tracing setups through code, flagging dead, redundant, or replaceable ones in Moq, NSubstitute, and FakeItEasy.
Use this skill ↓87% 96%+9 ptsof test cases passed
Passed 22 of 23 test cases with the skill, and 20 of 23 without it.
Audit `AsyncTestClass.cs` to check for C# unit testing anti-patterns such as `async void` test methods or `Thread.Sleep` calls, without analyzing mock setups.
Identify C# test anti-patterns such as async void or Thread.Sleep.
3 of 3 safety checks passed
Trace each mock setup through the production code's execution path to determine which setups are actually exercised at runtime and which are dead, unreachable, redundant, or replaceable with real implementations.
test-anti-patterns)| Input | Required | Description |
|---|---|---|
| Test code | Yes | Test files to analyze |
| Production code | Yes | Code under test — essential for tracing execution paths |
Read the test files and always read the production code. You cannot determine whether a mock setup is necessary without understanding the production method's control flow.
Identify the mock framework by scanning for its patterns:
new Mock<T>(), .Setup(...), .Verify(...)Substitute.For<T>(), .Returns(...), .Received(...)A.Fake<T>(), A.CallTo(...), .MustHaveHappened()Use the correct framework's terminology throughout your analysis.
For each test method, do the following:
Next to this one in the catalogue, plus more from the same author.