Esempio n. 1
0
        public async Task PutBlockScenarioTest(string containerName, string blobName, string blockId, string leaseId, byte[] content, HttpStatusCode?expectedError)
        {
            HttpRequestMessage request = BlobTests.PutBlockRequest(BlobContext, containerName, blobName, blockId, AccessCondition.GenerateLeaseCondition(leaseId));

            Assert.IsTrue(request != null, "Failed to create HttpRequestMessage");
            //HttpRequestHandler.SetContentLength(request, content.Length);
            request.Content = new ByteArrayContent(content);
            using (HttpResponseMessage response = await BlobTestUtils.GetResponse(request, BlobContext))
            {
                BlobTests.PutBlockResponse(response, BlobContext, expectedError);
            }
        }