public IDataSourceViewModel GetOrAddPath(string path) { IDataSourceViewModel dataSource; if (Directory.Exists(path)) { dataSource = _dataSources.GetOrAddFolder(path); } else { dataSource = _dataSources.GetOrAddFile(path); } OpenFile(dataSource); return(dataSource); }
public void GetOrAddFile(string fileName) { CurrentDataSource = _dataSources.GetOrAddFile(fileName); }
public void TestAdd1() { var model = _model.GetOrAddFile("foo"); _model.SelectedItem.Should().BeSameAs(model); model.IsVisible.Should().BeTrue(); }