How to suppress a message box during unit testing?

I use VS2008 and created a module testing project in it to test my component. While running unit tests for invalid test cases, I get a message box. And for each such message box, I need to click it to continue. I want to avoid the manual intervention required for these message boxes. Is there any way to suppress them programmatically? All these messages are only with the OK button. Any help.

TIA, Kapil

+3
source share
1 answer

You need to design for verification. Find the “Humble Dialog Box,” which explains how to bypass modal dialog boxes in tests.

, .

+1

Source: https://habr.com/ru/post/1782734/


All Articles