Ejemplo n.º 1
0
 protected void AssertUploadContext(string destination, FileInfo localFile, VhdUploadContext vhdUploadContext)
 {
     Assert.IsNotNull(vhdUploadContext);
     Assert.AreEqual(new Uri(destination), vhdUploadContext.DestinationUri);
     Assert.IsTrue(string.Compare(vhdUploadContext.LocalFilePath.FullName, localFile.FullName, StringComparison.InvariantCultureIgnoreCase) == 0);
 }
Ejemplo n.º 2
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);
        }