If I understand you right you want the call to ShowDialog
to invoke the fourth parameter to the method. Set it up like this:
UIServicemock.Setup(
u =>
u.ShowDialog(It.IsAny<string>(),
It.IsAny<string>(),
It.IsAny<Dictionary<string, object>>(),
It.IsAny<Action<Dictionary<string, object>>>(),
It.IsAny<Dictionary<string, object>>()))
.Callback<string,
string,
Dictionary<string, object>,
Action<Dictionary<string, object>>,
Dictionary<string, object>>(
(windowName,
parentWindowName,
inputFields,
closeCallBack,
windowProperties) =>
closeCallBack(windowProperties /* or whatever dictionary should go here*/)
);
This way the parameters passed to ShowDialog
are sent to the Action
given to the Callback
method. When ShowDialog
is invoked, the Action<Dictionary<string, object>>
given as closeCallBack
will be invoked.