public void UploadDownloadStandardBook_FilesAreInExpectedDirectory()
{
var fullBookSrcPath = Path.Combine(_srcCollectionPath, BookName);
var fullBookDestPath = Path.Combine(_destCollectionPath, BookName);
Assert.IsTrue(Directory.Exists(_destCollectionPath));
var srcFileCount = Directory.GetFiles(fullBookSrcPath).Count();
// Do not count the excluded files (thumbs.db, extra.pdf)
// preview.pdf exists in the source, but is not pulled down to the destination.
Assert.That(_client.GetBookFileCount(BloomS3Client.UnitTestBucketName, _storageKeyOfBookFolder), Is.EqualTo(srcFileCount - ExcludedFiles.Length + 1));
var matching = Directory.GetFiles(fullBookDestPath);
Assert.That(matching.Count(), Is.EqualTo(srcFileCount - ExcludedFiles.Length));
foreach (var fileName in Directory.GetFiles(fullBookSrcPath)
.Select(Path.GetFileName)
.Where(file => !ExcludedFiles.Contains(file.ToLower())))
{
Assert.IsTrue(File.Exists(Path.Combine(fullBookDestPath, fileName)));
}
}