I'm trying to use SpecFlow.Xamarin.Forms with a Prism.Forms. I get all sorts of error regarding Autofac unable to find the constructor for navigation. My view model is having a Prism Unity INavigationService. I ended up mocking the navigation service similar to the following:
public class MyAppTest: TestApp
{...
protected override void InitialiseContainer()
{
var logger = Substitute.For<ILoggerFacade>();
var applicationProvider = Substitute.For<IApplicationProvider>();
var container =Substitute.For<IUnityContainer>();
Resolver.Instance.Register<INavigationService>(new UnityPageNavigationService(container, applicationProvider, logger));
base.InitialiseContainer();
}
}
I passed that step but the issue got worst with giving and error message when initializing a task which I think is caused because of Mocking.
I kind of feel like this is not the way to go and somehow the Prism need to be integrated with SpecFlow or replace Autofac.
I was hoping if someone can provide a hint or maybe a small sample project. I've already Googled for hours but couldn't find anything.
I'm trying to use SpecFlow.Xamarin.Forms with a Prism.Forms. I get all sorts of error regarding Autofac unable to find the constructor for navigation. My view model is having a Prism Unity INavigationService. I ended up mocking the navigation service similar to the following:
I passed that step but the issue got worst with giving and error message when initializing a task which I think is caused because of Mocking.
I kind of feel like this is not the way to go and somehow the Prism need to be integrated with SpecFlow or replace Autofac.
I was hoping if someone can provide a hint or maybe a small sample project. I've already Googled for hours but couldn't find anything.