public void NavToOptionsPage() { MainViewModel vm = CreateMainViewModel(); RecordingPageViewModel rvm = (RecordingPageViewModel)vm.CurrentPage.DataContext; rvm.NavigateSettingsCommand.Execute(null); Assert.IsTrue(vm.CurrentPage is Pages.SettingsPage); }
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); }
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); }