i am writing unit test for a C# project.
One of the event handler raises a kind of Save as dialog wherein I have to enter a path and file name. On it’s ok click, I want to receive this string. How can I handle this.
thanks,
kapil
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t want the UI to actually appear during a unit test. At that point, it’s no longer a unit test. If you really want to test the UI, unit testing is not the place for it, instead use a UI testing framework. If you want to test some functionality underlying the UI, you will need to redesign your program so that whatever code is executing as a result of UI actions is independently testable.