Home Dashboard Directory Help
Search

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


Status: 

Closed
 as By Design Help for as By Design


1
0
Sign in
to vote
Type: Bug
ID: 786093
Opened: 5/2/2013 3:08:30 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

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.
Details
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)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
UnitTestExceptionBug.zip 5/2/2013 42 KB
UnitTestExceptionBug.zip 5/2/2013 42 KB