AeroFSSDK.Tests.TestUpload.ShouldUploadFileWithContents C# (CSharp) Method

ShouldUploadFileWithContents() private method

private ShouldUploadFileWithContents ( ) : void
return void
        public void ShouldUploadFileWithContents()
        {
            var parent = Client.CreateFolder(FolderID.Root, "TestUploadParent").ID;
            var name = "TestUpload";
            var fileID = Client.CreateFile(parent, name).ID;

            UploadProgress progress;
            using (var content = CreateContent(10000))
            {
                progress = Client.StartUpload(fileID, content);

                while (!progress.EOFReached)
                {
                    progress = Client.UploadContent(fileID, progress, content);
                }
            }

            var etag = Client.FinishUpload(fileID, progress);
            var file = Client.GetFile(fileID);

            Assert.AreEqual(etag, file.ETag);
            Assert.AreEqual(10000, file.Size);
            Assert.IsNotNull(file.LastModified);
        }