Пример #1
0
        public void DownloadUrl_GetsDocument()
        {
            var id         = Guid.NewGuid().ToString();
            var bookFolder = MakeBook("My Url Book", id, "someone", "My content");
            int fileCount  = Directory.GetFiles(bookFolder).Length;

            Login();
            string s3Id = _transfer.UploadBook(bookFolder, new NullProgress());

            _transfer.WaitUntilS3DataIsOnServer(BloomS3Client.UnitTestBucketName, bookFolder);
            var dest = _workFolderPath.CombineForPath("output");

            Directory.CreateDirectory(dest);

            var newBookFolder = _transfer.DownloadFromOrderUrl(_transfer.BookOrderUrl, dest, "nonsense");

            Assert.That(Directory.GetFiles(newBookFolder).Length, Is.EqualTo(fileCount + 1));             // book order is added during upload
        }