Exemplo n.º 1
0
        public void NavToOptionsPage()
        {
            MainViewModel vm = CreateMainViewModel();

            RecordingPageViewModel rvm = (RecordingPageViewModel)vm.CurrentPage.DataContext;

            rvm.NavigateSettingsCommand.Execute(null);

            Assert.IsTrue(vm.CurrentPage is Pages.SettingsPage);
        }
Exemplo n.º 2
0
        public void NavToRecordingPage()
        {
            MainViewModel vm = CreateMainViewModel();

            RecordingPageViewModel rvm = (RecordingPageViewModel)vm.CurrentPage.DataContext;

            rvm.NavigateSettingsCommand.Execute(null);

            // ReSharper disable once PossibleInvalidCastException
            SettingsPageViewModel svm = (SettingsPageViewModel)vm.CurrentPage.DataContext;

            svm.NavigateRecordingCommand.Execute(null);

            Assert.IsTrue(vm.CurrentPage is Pages.RecordingPage);
        }
Exemplo n.º 3
0
        public void StartRecording()
        {
            MainViewModel vm = CreateMainViewModel();

            RecordingPageViewModel rvm = (RecordingPageViewModel)vm.CurrentPage.DataContext;

            Assert.IsTrue(rvm.RecordingStatus == RecordingStatus.NotRecording);

            Assert.AreEqual(rvm.ElapsedTimeStr, TimeSpan.Zero.ToString("hh\\:mm\\:ss"));
            rvm.StartRecordingCommand.Execute(null);

            Assert.IsTrue(rvm.RecordingStatus == RecordingStatus.Recording);

            rvm.StopRecordingCommand.Execute(null);
            Assert.IsTrue(rvm.RecordingStatus == RecordingStatus.NotRecording);
        }