Example #1
0
        public void da_returns_files()
        {
            // arrange
            var location   = Assembly.GetExecutingAssembly().Location;
            var installDir = Path.GetDirectoryName(location);

            //act
            var files = DirectoryAccess.GetDirContent(installDir, "*");


            //assert
            Assert.NotEmpty(files);
        }
Example #2
0
        public void da_finds_files()
        {
            // arrange
            var fileStoreLocations = new FileStorageLocations();
            var fileStoreLocation  = fileStoreLocations.Locations.First();

            // act


            var files = DirectoryAccess.GetDirContent(fileStoreLocation.Location, fileStoreLocation.Filter);

            // assert
            Assert.NotEmpty(files);
            Assert.True(files.Count > 0);
        }
        private void GetFiles()
        {
            if (DirectoryAccess.Password == null)
            {
                var pw = this.InputBox.RequestPassword();
                if (pw == null)
                {
                    return;
                }
                DirectoryAccess.Password = pw;
            }


            Files = new ObservableCollection <FileInfo>(
                DirectoryAccess.GetDirContent(SelectedFileStoreLocation.Location, SelectedFileStoreLocation.Filter));
            OnPropertyChanged("Files");
        }