public void TestChooseLineNumber2() { var viewModel = new GoToLineViewModel(); viewModel.MonitorEvents(); viewModel.LineNumber = 42; new Action(() => viewModel.ChoseLineNumber()).ShouldNotThrow(); viewModel.ShouldRaise(nameof(GoToLineViewModel.LineNumberChosen)); }
public void TestChooseLineNumber1() { var viewModel = new GoToLineViewModel(); viewModel.MonitorEvents(); viewModel.LineNumber.Should().BeNull(); new Action(() => viewModel.ChoseLineNumber()).ShouldNotThrow(); viewModel.ShouldNotRaise(nameof(GoToLineViewModel.LineNumberChosen), "because no line number was entered yet"); }