单元测试时如何隐藏消息框 [英] How to suppress a message box while unit testing

查看:105
本文介绍了单元测试时如何隐藏消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 我正在为Wpf应用程序中的验证功能编写单元测试用例.每当我运行单元测试时,由于验证,屏幕上会弹出一个消息框.我只想在单元测试时隐藏消息框.

 I am writing unit test case for a validation function in Wpf app.  Whenever i run the unit test , due to validation a message box pop up in the screen. I just want to suppress the message box while unit testing.

有人能给我个主意吗?

 

推荐答案

有什么建议吗?


这篇关于单元测试时如何隐藏消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆