We are developing a Xamarin Forms (4.1.0.778454) application using Prism (7.1.0.431). While writing unit test cases using NUnit and Moq, the following error occurred when the code reaches the statement "_navigationService.ClearPopupStackAsync
".
System.InvalidOperationException: 'You MUST install Rg.Plugins.Popup to each project and call Rg.Plugins.Popup.Popup.Init(); prior to using it.
The instance of INavigationService is supplied by constructor injection. So that, in unit tests we are using Mock objects of INavigationService.
While analyzing, I found that ClearPopupStackAsync is an extension method, so that it cannot be mocked. Can anyone suggest some alternative for mocking?