Beispiel #1
0
        public void TestDismissBeforePushViaButtonPress()
        {
            AddStep("dismissed dialog push", () =>
            {
                TestPopupDialog dialog;
                overlay.Push(dialog = new TestPopupDialog
                {
                    Buttons = new PopupDialogButton[]
                    {
                        new PopupDialogOkButton { Text = @"OK" },
                    },
                });

                dialog.PerformOkAction();
            });

            AddAssert("no dialog pushed", () => overlay.CurrentDialog == null);
        }
        public void TestDismissBeforePushViaButtonPress()
        {
            TestPopupDialog testDialog = null;

            AddStep("dismissed dialog push", () =>
            {
                overlay.Push(testDialog = new TestPopupDialog
                {
                    Buttons = new PopupDialogButton[]
                    {
                        new PopupDialogOkButton {
                            Text = @"OK"
                        },
                    },
                });

                testDialog.PerformOkAction();
            });

            AddAssert("no dialog pushed", () => overlay.CurrentDialog == null);
            AddAssert("dialog is not part of hierarchy", () => testDialog.Parent == null);
        }