TwentyTwenty.Storage.Amazon.Test.UpdateTestsAsync.Test_Blob_ContentDisposition_Updated_Async C# (CSharp) Method

Test_Blob_ContentDisposition_Updated_Async() private method

private Test_Blob_ContentDisposition_Updated_Async ( ) : void
return void
        public async void Test_Blob_ContentDisposition_Updated_Async()
        {
            var container = GetRandomContainerName();
            var blobName = GenerateRandomName();
            var filename = "testname.jpg";
            var contentType = "image/jpg";
            var newContentType = "image/png";
            var data = GenerateRandomBlobStream();

            await CreateNewObjectAsync(container, blobName, data, false, contentType);

            var newProps = new BlobProperties
            {
                ContentType = newContentType,
                Security = BlobSecurity.Public,                
            }.WithContentDispositionFilename(filename);

            await _provider.UpdateBlobPropertiesAsync(container, blobName, newProps);

            var meta = await _client.GetObjectMetadataAsync(Bucket, container + "/" + blobName);

            Assert.Equal(newProps.ContentDisposition, meta.Headers.ContentDisposition);
        }
    }