public void CancelCommand() { SessionSetupViewModel sessionSetupViewModel = new SessionSetupViewModel( new StubConsoleService(), new StubSettingsService(), new StubSerialPortService(), new ConsoleFormatService(), new StubDialogService()); sessionSetupViewModel.Initialize(); sessionSetupViewModel.CancelCommand.Execute(null); }
public void StartCommand() { var dialogService = new StubDialogService(); SessionSetupViewModel sessionSetupViewModel = new SessionSetupViewModel( new StubConsoleService(), new StubSettingsService(), new StubSerialPortService(), new ConsoleFormatService(), dialogService); sessionSetupViewModel.Initialize(); sessionSetupViewModel.StartCommand.Execute(null); Assert.IsFalse(dialogService.StubDialogShown); Assert.IsTrue(sessionSetupViewModel.IsValid); }