public XunitApp CreateApp() { PageNavigationRegistry.ClearRegistrationCache(); var initializer = new XunitPlatformInitializer(_testOutputHelper); return(new XunitApp(initializer)); }
public INavigationServiceExtensionsFixture() { PageNavigationRegistry.ClearRegistrationCache(); PageNavigationRegistry.Register("NavigationPage", typeof(NavigationPage)); PageNavigationRegistry.Register("Page1", typeof(NavigationPathPageMock)); PageNavigationRegistry.Register("Page2", typeof(NavigationPathPageMock2)); PageNavigationRegistry.Register("Page3", typeof(NavigationPathPageMock3)); PageNavigationRegistry.Register("Page4", typeof(NavigationPathPageMock4)); PageNavigationRegistry.Register("TabbedPage1", typeof(NavigationPathTabbedPageMock)); PageNavigationRegistry.Register("MasterDetailPage", typeof(MasterDetailPage)); }
public FixtureBase(ITestOutputHelper testOutputHelper) { _testOutputHelper = testOutputHelper; Xamarin.Forms.Mocks.MockForms.Init(); PageNavigationRegistry.ClearRegistrationCache(); ContainerLocator.ResetContainer(); var type = typeof(PopupNavigation); var property = type.GetField("_popupNavigation", BindingFlags.NonPublic | BindingFlags.Static); property.SetValue(null, new PluginNavigationMock()); }
public void GetPageType() { PageNavigationRegistry.ClearRegistrationCache(); var name = "MainPage"; var type = typeof(PageMock); PageNavigationRegistry.Register(name, type); var infoType = PageNavigationRegistry.GetPageType(name); Assert.Equal(type, infoType); }
public void RegisterPageForNavigation() { PageNavigationRegistry.ClearRegistrationCache(); var name = "MainPage"; var type = typeof(PageMock); PageNavigationRegistry.Register(name, type); var info = PageNavigationRegistry.GetPageNavigationInfo(name); Assert.NotNull(info); }
public INavigationServiceExtensionsFixture() { ContainerLocator.ResetContainer(); var container = new Mock <IContainerExtension>(); container.Setup(x => x.CreateScope()).Returns(Mock.Of <IScopedProvider>()); ContainerLocator.SetContainerExtension(() => container.Object); PageNavigationRegistry.ClearRegistrationCache(); PageNavigationRegistry.Register("NavigationPage", typeof(NavigationPage)); PageNavigationRegistry.Register("Page1", typeof(NavigationPathPageMock)); PageNavigationRegistry.Register("Page2", typeof(NavigationPathPageMock2)); PageNavigationRegistry.Register("Page3", typeof(NavigationPathPageMock3)); PageNavigationRegistry.Register("Page4", typeof(NavigationPathPageMock4)); PageNavigationRegistry.Register("TabbedPage1", typeof(NavigationPathTabbedPageMock)); PageNavigationRegistry.Register("MasterDetailPage", typeof(MasterDetailPage)); }
public void Dispose() { PageNavigationRegistry.ClearRegistrationCache(); }
public void Dispose() { PrismContainerExtension.Reset(); PageNavigationRegistry.ClearRegistrationCache(); }
protected AppMock GetApp() { PageNavigationRegistry.ClearRegistrationCache(); return(new AppMock(new XUnitPlatformInitializer(_testOutputHelper))); }