Azure.Storage.Tests.BlobStorageTests.GetBlobContentsAsStreamSucceeds C# (CSharp) Method

GetBlobContentsAsStreamSucceeds() private method

private GetBlobContentsAsStreamSucceeds ( ) : void
return void
        public void GetBlobContentsAsStreamSucceeds()
        {
            const string stringBlob = "streamblob";
            const string originalValue = "Hello World";
            blobStorage.CreateBlockBlob(stringBlob, "text/plain", originalValue);
            var stream = blobStorage.GetBlockBlobDataAsStream(stringBlob);
            string result;
            using (var reader = new StreamReader(stream, Encoding.UTF8))
            {
                result = reader.ReadToEnd();
            }

            Assert.True(!string.IsNullOrEmpty(result));
            Assert.True(string.Equals(result, originalValue, StringComparison.CurrentCultureIgnoreCase));
        }