Unit test gets the wrong exception from a method - by Yván Ecarri

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 786093 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 5/2/2013 3:08:30 AM
Access Restriction Public

Description

When you test a method that throws an exception and you have some expressions in the Watch window that also generates exceptions, the unit test gets the exception from the Watch window instead of the one trhown by the method.

I found this problem when working with a SqlDataReader but I think it will fail whennever the Whatch window generates an exception.
Sign in to post a comment.
Posted by Microsoft on 5/4/2013 at 10:49 PM
Thanks Yvan for reporting this issue.

In unit test framework, we don't do any special handling for watch window and probably that's the way system work.

Regards
Visual Studio Product Team
Posted by Microsoft on 5/2/2013 at 9:27 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 5/2/2013 at 3:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)