priya
priya

Reputation: 858

suppressing the dialog box that pop up while unit Testing

I am doing MVVM unit Test testing of view models and inside the open method there is a call to the view that pop ups the dialog box to enter the password given as the argument in the Test. Us there any way to suppress that call since the call is inside the function which is being unit Tested.

Upvotes: 1

Views: 322

Answers (1)

Arnaud Weil
Arnaud Weil

Reputation: 2492

Simply use a popup-managing system like ones found in MVVMLight, Caliburn or Prism. When unit testing, provide a mock for the system (e.g. Rhino Mocks).

Upvotes: 1

Related Questions