public void TestUpdateNoLineSelected() { _viewModel.CurrentDataSource = _dataSource.Object; _viewModel.AddBookmarkCommand.CanExecute(null).Should().BeFalse("because not a single line is selected"); _dataSource.Setup(x => x.SelectedLogLines).Returns(new HashSet <LogLineIndex> { 42 }); _viewModel.Update(); _viewModel.AddBookmarkCommand.CanExecute(null).Should().BeTrue("because a single line is selected and thus it should be possible to add a bookmark there"); _dataSource.Setup(x => x.SelectedLogLines).Returns(new HashSet <LogLineIndex>()); _viewModel.Update(); _viewModel.AddBookmarkCommand.CanExecute(null).Should().BeFalse("because not a single line is selected"); }
public override void Update() { CurrentDataSourceLogView?.Update(); _dataSources.Update(); _bookmarks.Update(); _outline.Update(); _issues.Update(); }