public void _UpdateChecklistStatus(object checklistViewModel) {
OnCompletion<List<object>> updateChecklistStatusCallback = (result, ex) => {
if (result != null && result[0] != null && result[0] is bool) {
Dispatcher.BeginInvoke(new Action(() => { if (updateResult == false) { //some code to execute
}
}
}
m_ObjectManager.UpdateDataAsync(new ChecklistDataModel(), OperationType.SaveSingle, new CacheSettings(), updateChecklistStatusCallback, updateChecklistStatuskParam, Constants.PROFILE_UPDATE_CHECKLIST_STATUS);
}
=======================================================================
I have mocked the object "m_ObjectManager" that calls(asynchronous) a WCF service through "UpdateDataAsync" and calls back the callback "updateChecklistStatusCallback" with the valid result which is also mocked.
Now the issue is after mocking (m_ObjectManager.UpdateDataAsync) i get the callback into "updateChecklistStatusCallback" but the code within "Dispatcher.BeginInvoke" never gets executed.
"Disptacher" is System.Windows.Threading.
I have placed the breakpoints at several places within "Dispatcher.BegingInvoke" block but none of them got hit and the unit test completed successfully.
Can someone please help me on what to do about it?Is there any way to mock it or something else?
Eagerly awaiting the responses!
Thanks,
Sandeep
--
You received this message because you are subscribed to the Google Groups "NSubstitute" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nsubstitute...@googlegroups.com.
To post to this group, send email to nsubs...@googlegroups.com.
Visit this group at http://groups.google.com/group/nsubstitute.
For more options, visit https://groups.google.com/groups/opt_out.