private void DownloadBook()
        {
            var expectedBookDestination = Path.Combine(_destCollectionPath, BookName);
            var actualDestination       = _client.DownloadBook(BloomS3Client.UnitTestBucketName, _storageKeyOfBookFolder, _destCollectionPath);

            Assert.AreEqual(expectedBookDestination, actualDestination);
        }
Esempio n. 2
0
        static int Main(string[] arguments)
        {
            if (arguments.Length != 1)
            {
                Console.WriteLine("Usage: BloomBookDownloader keyOnAmazonS3");
                return(1);
            }

            var t = new BloomS3Client(BloomS3Client.SandboxBucketName);

            var destinationPath = Path.Combine(Path.GetTempPath(), "BloomBookDownloader");

            if (!Directory.Exists(destinationPath))
            {
                Directory.CreateDirectory(destinationPath);
            }

            t.DownloadBook(arguments[0], destinationPath);

            return(0);
        }
 public void DownloadBook_DoesNotExist_Throws()
 {
     Assert.Throws <DirectoryNotFoundException>(() => _client.DownloadBook(BloomS3Client.UnitTestBucketName, "notthere", _workFolder.FolderPath));
 }
Esempio n. 4
0
 public void DownloadBook_DoesNotExist_Throws()
 {
     _client.DownloadBook("notthere", _workFolderPath);
 }