Reputation: 858
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
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