CodeRush User Richard O'Neil has created his own set of FakeItEasy templates to speed his development.
These templates give him an edge when creating his fake objects using this popular framework.
In case you’re unaware, FakeItEasy is a Mocking framework for .Net which is hosted on GitHub
Templates
As I write this, Richard has support for the following templates:
Setup FakeItEasy
Trigger: ufie<space>
Effect: Adds ‘FakeItEasy’ to the namespace references of the current file.
Note:This template does not need to be called explicitly since it is called for each of the following templates already. Additionally, the reference is added in the correct location above the class definition.
Create a Fake Object
Trigger: fief<space>
Expands to:
Set up a call to return a value
Trigger: fiecr<space>
Expands to:
Creating ignore parameters
Template: fieany?Type?
Examples:
Being the awesome community person he is, Richard has published these templates on github so anyone can take advantage of them.
If you’d like to use these templates in your own projects, download the xml file from the repository and follow the Import instructions in this post