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
Could you detect and suggest the simplification of ...Any calls with default for modern C# versions, as you describe here?
publicinterfaceITest{voidDoSomething(string?thing);}publicclassTest{[Test]publicvoidTestSth(){vartest=Substitute.For<ITest>();test.DoSomething("this");test.ReceivedWithAnyArgs().DoSomething(Arg.Any<string>());// too complicatedtest.ReceivedWithAnyArgs().DoSomething(default!);// could be simplified as this}}
...the same for setting return args with ReturnsForAnyArgs etc.
The text was updated successfully, but these errors were encountered:
rklec
changed the title
Detect ReceivedWithAnyArgs simplification with "default(!)"
Detect ReturnsForAnyArgs/ReceivedWithAnyArgs simplification with "default(!)"
Oct 28, 2021
Could you detect and suggest the simplification of
...Any
calls withdefault
for modern C# versions, as you describe here?...the same for setting return args with
ReturnsForAnyArgs
etc.The text was updated successfully, but these errors were encountered: