I am using C# MOQ library.
Lets say I want to create a UnitTest
for this piece of code:
if(condition){
privateMethod();
}
else{
logger.info("didn't hit")
}
I want to check if privateMethod
was hit, I can't use the Verify
function as it is private. How can I do that?
I thought about adding a Status
member dedicated for the unit testing, which will hold the last location before exiting the tested method.