jeudi 5 février 2015

TypeMock Faking static method in static class

Using TypeMock Isolator...


I am trying to Mock a static method call that is inside a static class but it keeps calling the original code.


I ran across this thread and I am doing exactly what they suggest but still not luck.


I have tried doing it 2 different ways:


1:



Isolate.Fake.StaticMethods(typeof(QueueDAO), Members.ReturnRecursiveFakes);


2:



Isolate.WhenCalled(() => QueueDAO.UpdateQueueStatus(queueCmtId, CmtQueueStatus.Error)).IgnoreCall();


Neither solution works. Does it have something to do with the enumeration that is passed in?


Aucun commentaire:

Enregistrer un commentaire