public void TestAddFolder() { var path = Path.GetTempPath(); var source = new Mock <IFolderDataSource>(); source.Setup(x => x.OriginalSources).Returns(new IDataSource[0]); source.Setup(x => x.FilteredLogSource).Returns(new Mock <ILogSource>().Object); source.Setup(x => x.UnfilteredLogSource).Returns(new Mock <ILogSource>().Object); _dataSources.Setup(x => x.AddFolder(It.IsAny <string>())).Returns(source.Object); var model = new LogViewMainPanelViewModel(_services, _actionCenter.Object, _dataSources.Object, _quickFilters.Object, _highlighters.Object, _settings.Object); var dataSource = model.GetOrAddPath(path); dataSource.Should().BeOfType <FolderDataSourceViewModel>(); }
private void ShowLog() { _logViewPanel.GetOrAddPath(Constants.ApplicationLogFile); }