Skip to content

Instantly share code, notes, and snippets.

@Creastoff
Created August 12, 2023 13:41
Show Gist options
  • Save Creastoff/280a33caa684db756c7cce91d318b41f to your computer and use it in GitHub Desktop.
Save Creastoff/280a33caa684db756c7cce91d318b41f to your computer and use it in GitHub Desktop.
Albert Monteiro has produced this repository with the required patterns to replace Moq with NSubstitute.
https://github.com/AlbertoMonteiro/moq-to-nsubstitute/tree/main
Bare in mind there are still some patterns missing (some of which have been raised as issues in the repo) so you may have to make adjustments depending on your usage of Moq.
I have also writtten the below tool which leverages these patterns to automatically replace instances of Moq with NSubstitute.
https://github.com/Creastoff/Moqstitute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment