TwentyTwenty.Storage.Amazon.Test.ExceptionTestsAsync.Test_Exception_BlobPropertiesUpdatedAsync_Auth C# (CSharp) Method

Test_Exception_BlobPropertiesUpdatedAsync_Auth() private method

private Test_Exception_BlobPropertiesUpdatedAsync_Auth ( ) : void
return void
        public async void Test_Exception_BlobPropertiesUpdatedAsync_Auth()
        {
            var container = GetRandomContainerName();
            var blobName = GenerateRandomName();
            var newContentType = "image/png";

            var ex = await Assert.ThrowsAsync<StorageException>(()
                => _exceptionProvider.UpdateBlobPropertiesAsync(container, blobName, new BlobProperties
                {
                    ContentType = newContentType,
                    Security = BlobSecurity.Public
                }));

            Assert.Equal((int)StorageErrorCode.InvalidCredentials, ex.ErrorCode);
        }