Closed wakuflair closed 5 years ago
You can see that exception raised here. From there, we can tell that this is because either this.Parent
isn't set of its value isn't an IChildDelegate
.
The Parent
property is publically settable (and it's set by a conductor, if there is one).
For your test, create a mock which implements IChildDelegate
, set LoginViewModel.Parent = yourModel;
, then test that your mock's CloseItem
method is called.
It works! Thanks @canton7 !
Hi, I'm testing a ViewModel, which will call
RequestClose(true)
somewhere, the unit test method is like this:Now it failed with the exception:
I know it's related to
WindowConductor
, but just can't figure it out.