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
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
I really think that the exception handling by TypeMock needs to be improved. For example, one of my tests is throwing an exception but I dont know what it is because the excpetion gets masked by TypeMock when it tries to verify the mocks in the fixture teardown and all I see in the NUnit Gui is a TypeMock verification exception. This makes it a pain to debug the true problem because I have to find where the exception is occurring in my code and then wrap a try catch block around it and then step through the code with the debugger so that i can determine the exception.
asked by jnapier (9.6k points)

1 Answer

0 votes
one of my tests is throwing an exception but I dont know what it is because the excpetion gets masked by TypeMock when it tries to verify the mocks in the fixture teardown and all I see in the NUnit Gui is a TypeMock verification exception.


Can you please show a small sample.
As far as I know, when a test fails in both the test and the teardown - both errors are shown.

The only time that errors are mixed is when a Argument Validation fails. TypeMock will throw the error immediatly and your application will catch it.
If this is the case you can Postpone the Validations by using ValidateArgsOnVerify
answered by scott (32k points)
...