Esempio n. 1
0
        public void TestResumeViaNotification()
        {
            AddStep("step to next", () => overlay.NextButton.TriggerClick());

            AddAssert("is at known screen", () => overlay.CurrentScreen is ScreenBeatmaps);

            AddStep("hide", () => overlay.Hide());
            AddAssert("overlay hidden", () => overlay.State.Value == Visibility.Hidden);

            AddStep("notification arrived", () => notificationOverlay.Verify(n => n.Post(It.IsAny <Notification>()), Times.Once));

            AddStep("run notification action", () => lastNotification.Activated());

            AddAssert("overlay shown", () => overlay.State.Value == Visibility.Visible);
            AddAssert("is resumed", () => overlay.CurrentScreen is ScreenBeatmaps);
        }