9
วิธีที่ดีที่สุดในการทดสอบข้อยกเว้นด้วย Assert เพื่อให้แน่ใจว่าจะถูกโยนทิ้ง
คุณคิดว่านี่เป็นวิธีที่ดีสำหรับการทดสอบข้อยกเว้นหรือไม่? ข้อเสนอแนะใด ๆ ? Exception exception = null; try{ //I m sure that an exeption will happen here } catch (Exception ex){ exception = ex; } Assert.IsNotNull(exception); ฉันใช้ MS Test
99
c#
.net
unit-testing