public void FirstScheduleItemSelected() { Schedule schedule = BaseSchedule.Build(); SchedulePageViewModel model = CreateViewModel(schedule); Assert.NotNull(model.ItemViewModel); }
public void PrevFromFirstItemNotAllowed() { Schedule schedule = BaseSchedule.Build(); SchedulePageViewModel model = CreateViewModel(schedule); Assert.False(model.PreviousCommand.CanExecute(null)); }
public void NextFromLastItemFinishes() { Schedule schedule = BaseSchedule.Build(); SchedulePageViewModel model = CreateViewModel(schedule); model.NextCommand.Execute(null); Assert.Raises <EventArgs>( attach: handler => model.ScheduleFinished += handler, detach: handler => model.ScheduleFinished -= handler, testCode: () => model.NextCommand.Execute(null) ); }
public void RetryRecording() { Schedule schedule = BaseSchedule.Build(); SchedulePageViewModel model = CreateViewModel(schedule); model.RecordCommand.Execute(null); // start Assert.Equal(ScheduleItemStateType.Recording, model.DisplayState); model.RecordCommand.Execute(null); // stop Assert.Equal(ScheduleItemStateType.Finish, model.DisplayState); model.RetryCommand.Execute(null); Assert.Equal(ScheduleItemStateType.Start, model.DisplayState); Assert.True(model.ShowRecordButton, "Record button should show"); }