Thank you for reaching back.
In the sample I provided, I am not using a mock of the Foo class. Instead, you should see that I am instantiating the actual type, like so:
var mock =
Then, the arrange of AlphaProp
still works, thanks to the JustMock's partial mocking feature
. So, the answer to your first question is no, the class does not need to be mocked.
As for the second question, I am not sure if I understand you correctly. In my sample, I am mocking AlphaProp
as this is the name of the property in that case. I use alpha
as a parameter name in the Request
function. If in your code, you make alpha
as a property, there should be no problem to arrange its behavior. Please, excuse me if there is something that I am missing on this matter.
I hope this helps.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.