Microsoft fakes are quite useful when we want to quickly set up the framework for testing of basic dependency interactions. In case of complex in depth testing a third party mock frameworks are more suitable.
Create the fakes assembly by right-clicking System in the Unit Test Project’s References and select “Add Fakes Assembly”.
*The fakes are wrapped in a ShimsContext. Below sample test method.