- Find:
using Moq; - Replace:
using NSubstitute;
- Find:
new Mock<(.+?)>\((.*?)\) - Replace:
Substitute.For<$1>($2)
- Find:
\bMock<(.+?)> - Replace:
$1 - Find:
\bMock\.Of<(.*)>\((.*?)\) - Replace:
Substitute.For<$1>($2)
- Find:
(?<!\.)\b(\w+)(\s\n\s*)?\.Setup(Get)?\((\w+) => \4(\.?.+?)\)(?=\.R|\s\n) - Replace:
$1$5 - Find:
\.Get<(.+?)>\(\)\.Setup\((\w+) => \2(\.?.+?)\)(?=\.R|\s\n) - Replace:
.Get<$1>()$3 - Find:
\.Get<(.+?)>\(\)\.SetupSequence?\((\w+) => \3(\.?.+?)\)(?=\.R|\s\n) - Replace:
.Get<$1>()$3 - Find:
(?<!\.)\b(\w+)(\s\n\s*)?\.SetupSequence?\((\w+) => \3(\.?.+?)\)(?=\.R|\s\n) - Replace:
$1$4 - Find:
\.Get<(.+?)>\(\)\.SetupSequence?\((\w+) => \2(\.?.+?)(\)(?!\))) - Replace:
.Get<$1>()$3
- Find:
(?<!\.)\b(\w+)\.Verify\((\w+) => \2(.+?), Times\.(Once(\(\))?|Exactly\((?<times>\d+)\))\) - Replace:
$1.Received(${times})$3 - Find:
(?<!\.)\b(\w+)\.Verify\((\w+) => \2(.+?), Times\.Never\) - Replace:
$1.DidNotReceive()$3
- Find:
(?<!\.)\b(\w+)(\s\n\s*)?\.Setup\(((\w+) => \4(\..?.+?)\))\)\s*\n*\.Throws - Replace:
$1.When($3).Throw
- Find:
It.IsAny - Replace:
Arg.Any - Find:
It.Is - Replace:
Arg.Is
- Find:
MoqMockingKernel - Replace:
NSubstituteMockingKernel
- Find:
using Ninject.MockingKernel.Moq; - Replace:
using Ninject.MockingKernel.NSubstitute;
- Find:
\.GetMock<(.+?)>\(\) - Replace:
.Get<(.+?)>()