chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes

I am verifying a private method is called with arguments

Isolate.Verify.NonPublic.WasCalled(myObj, "GetResponseXml").WithArguments(actualCompleteUrl);

This tes is passing while in debug mode, Test Results - Passed

But when I select the unit test method and run ( in context) - test is failing, Test Results window shows - Failed

Is not it Unfair ?

Please help
asked by Phani (600 points)

1 Answer

0 votes

There should be no difference between run and debug of tests. Can you please post the the test and perhaps the code under under test?

This behavior may happen when there's a race condition between the assert and code under test. Is it possible that the test involves multi-threading code?

Typemock Support
answered by Elisha (12k points)