Exemplo n.º 1
0
        public void StartTest()
        {
            UITester.Dispatcher.Invoke(() =>
            {
                tutorialManager.Stop();
                Assert.IsFalse(tutorialManager.IsStarted);

                bool started                        = false;
                tutorialManager.Started            += (_, __) => started = true;
                bool currentChanged                 = false;
                tutorialManager.CurrentItemChanged += (_, __) => currentChanged = true;

                tutorialManager.Start();

                Assert.IsTrue(started);
                Assert.IsTrue(currentChanged);
                Assert.IsTrue(tutorialManager.IsStarted);
                Assert.AreEqual(tutorialManager.CurrentItemId, tutorialManager.Items.Keys.First());
                Assert.AreEqual(tutorialManager.CurrentItem, tutorialManager.Items.Values.First());

                // for code coverage
                var manager = new TutorialManager();
                manager.Start();
            });
        }
Exemplo n.º 2
0
        public void SetUp()
        {
            UITester.Init(typeof(Utils.Net.Sample.App));

            UITester.Dispatcher.Invoke(() =>
            {
                tutorialManager = ((Sample.MainWindowViewModel)UITester.MainWindow.DataContext).TutorialManager;
                tutorialManager.Start();
            });
        }