Пример #1
0
        protected void AssertUploadContextAndContentMD5UsingSaveVhd(string destination, FileInfo localFile, VhdUploadContext vhdUploadContext, string md5hash, bool deleteBlob = true, bool deleteLocal = true)
        {
            AssertUploadContext(destination, localFile, vhdUploadContext);

            FileInfo downloadFile = new FileInfo(localFile.FullName + "_download.vhd");

            BlobHandle blobHandle = getBlobHandle(destination);

            Assert.IsTrue(VerifyMD5hash(blobHandle, md5hash));
            SaveVhdAndAssertContent(blobHandle, downloadFile, true, deleteBlob, deleteLocal);
        }
Пример #2
0
 private void AssertUploadContextAndContentMD5(string destination, FileInfo localFile, VhdUploadContext vhdUploadContext, bool deleteBlob = true)
 {
     AssertUploadContext(destination, localFile, vhdUploadContext);
     BlobUri blobPath;
     Assert.IsTrue(BlobUri.TryParseUri(new Uri(destination), out blobPath));
     AssertContentMD5(blobPath.BlobPath, deleteBlob);
 }
Пример #3
0
 private void AssertUploadContext(string destination, FileInfo localFile, VhdUploadContext vhdUploadContext)
 {
     Assert.IsNotNull(vhdUploadContext);
     Assert.AreEqual(new Uri(destination), vhdUploadContext.DestinationUri);
     Assert.AreEqual(vhdUploadContext.LocalFilePath.FullName, localFile.FullName);
 }