When a mock is created by using Mock.Create all dependencies are also implemented. Thus, if you are interested in a specific interface implementation you can use the as
operator and call the interface members.

Example

Consider the following interface:

C#

Copy

publicinterface IFoo : IDisposable
{
void Do();
}

The IFoo interface has IDisposable implemented. When you are interested only in IDisposable calls you need to perform a
conversion from the created mock to IDisposable.