mercredi 27 mai 2015

FakeItEasy - how to test virtual method

I am using FakeItEasy to fake class to do the following unit test. When I debug the unit test step by step, noticed that it will not step into original method -->IsOrderHasToBeCharged(). Instead, it always default the returned value as False. Is it because the method is marked as virtual in the working class? Is there any other way to do the unit test for that method?

enter image description here

Aucun commentaire:

Enregistrer un commentaire