[TestMethod]
public void Test_CallPrivateGeneric()
{
var fakeCalculatorGeneric = Isolate.Fake.Instance<CalculatorGeneric<String>>();
Isolate.Invoke.Method(fakeCalculatorGeneric, "DoSomethingPrivate");
Isolate.Verify.NonPublic.WasCalled(fakeCalculatorGeneric, "DoSomethingPrivate");
}
public class CalculatorGeneric<T>
{
public string DoSomething<T>(bool callMethod)
{
if (callMethod)
{
return DoSomethingPrivate<T>();
}
else
{
return "DidNotCalltheMethod";
}
}
private string DoSomethingPrivate<T>()
{
return "foo";
}
}
But when I ran this time, I saw this error:
TypeMock.TypeMockException :
*** Could not invoke CalculatorGeneric`1.DoSomethingPrivate():
Currently Isolate.Invoke.Method() does not support generic methods
When will typemock support invoking generics and verify that generics are called?