public void Navigate_FromMasterDetailPage_ToSamePage() { var navigationService = new PageNavigationServiceMock(_container); var rootPage = new MasterDetailPageMock(); ((IPageAware)navigationService).Page = rootPage; Assert.IsType(typeof(ContentPageMock), rootPage.Detail); navigationService.Navigate("TabbedPage"); var firstDetailPage = rootPage.Detail; Assert.IsType(typeof(TabbedPageMock), firstDetailPage); navigationService.Navigate("TabbedPage"); Assert.Equal(firstDetailPage, rootPage.Detail); }
public async void Navigate_FromMasterDetailPage_ToTabbedPage_IsNotPresented() { var navigationService = new PageNavigationServiceMock(_container, _applicationProvider, _loggerFacade); var rootPage = new MasterDetailPageMock(); ((IPageAware)navigationService).Page = rootPage; rootPage.IsPresentedAfterNavigation = false; Assert.IsType(typeof(ContentPageMock), rootPage.Detail); Assert.False(rootPage.IsPresented); await navigationService.NavigateAsync("TabbedPage"); Assert.IsType(typeof(TabbedPageMock), rootPage.Detail); Assert.False(rootPage.IsPresented); }
public async void Navigate_FromMasterDetailPage() { var navigationService = new PageNavigationServiceMock(_container); var rootPage = new MasterDetailPageMock(); ((IPageAware)navigationService).Page = rootPage; Assert.IsType(typeof(ContentPageMock), rootPage.Detail); await navigationService.Navigate("TabbedPage"); Assert.IsType(typeof(TabbedPageMock), rootPage.Detail); await navigationService.Navigate("CarouselPage"); Assert.IsType(typeof(CarouselPageMock), rootPage.Detail); }
public async void Navigate_FromMasterDetailPage_ToSamePage() { var navigationService = new PageNavigationServiceMock(_container, _applicationProvider, _loggerFacade); var rootPage = new MasterDetailPageMock(); ((IPageAware)navigationService).Page = rootPage; Assert.IsType(typeof(ContentPageMock), rootPage.Detail); await navigationService.NavigateAsync("TabbedPage"); var firstDetailPage = rootPage.Detail; Assert.IsType(typeof(TabbedPageMock), firstDetailPage); await navigationService.NavigateAsync("TabbedPage"); Assert.Equal(firstDetailPage, rootPage.Detail); }