Ejemplo n.º 1
0
        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);
 }
Ejemplo n.º 3
0
        public void TestAdd1()
        {
            var model = _model.GetOrAddFile("foo");

            _model.SelectedItem.Should().BeSameAs(model);
            model.IsVisible.Should().BeTrue();
        }