Esempio n. 1
0
        public void TestChooseLineNumber2()
        {
            var viewModel = new GoToLineViewModel();

            viewModel.MonitorEvents();

            viewModel.LineNumber = 42;
            new Action(() => viewModel.ChoseLineNumber()).ShouldNotThrow();
            viewModel.ShouldRaise(nameof(GoToLineViewModel.LineNumberChosen));
        }
Esempio n. 2
0
        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");
        }