Completed
Last Updated: 17 May 2013 12:23 by Kaloyan
Kaloyan
Created on: 26 Apr 2013 15:23
Type: Feature Request
0
Arranging agaisnt generic method
I'd like to intercept a call to a generic method similar to:

public  class MyClass
{
    public void MyMethod<T>()
    {
        //
    }
}

Now I want to arrange a MyClass instance so I can assert that the method has been call only once for an specific type and never for any other type. I'm tryig to do something similar to:

var service = Mock.Create<MyClass>();
Mock.Arrange(() => service.MyMethod<T>()).OccursNever();

So I can assert the generic method is never called.
0 comments