public void CustomMaskIsInserted() { SetMainPage(); var dialogService = CreateDialogService(); var customMask = new Image(); DialogMock.ConstructorCallback = v => DialogLayout.SetMask(v, customMask); dialogService.ShowDialog(DialogMockViewName); var mainPage = _currentApp.MainPage as ContentPage; var layout = mainPage.Content as AbsoluteLayout; Assert.IsType <Image>(layout.Children[1]); }
public void CustomMaskIsInserted() { SetMainPage(); var dialogService = CreateDialogService(); var customMask = new Image(); DialogMock.ConstructorCallback = v => DialogLayout.SetMask(v, customMask); dialogService.ShowDialog(DialogMockViewName); Assert.Single(_currentApp.MainPage.Navigation.ModalStack); var dialogPage = _currentApp.MainPage.Navigation.ModalStack.First() as DialogPage; Assert.NotNull(dialogPage); var layout = dialogPage.Content as AbsoluteLayout; Assert.IsType <Image>(layout.Children[0]); }