Example #1
0
        public void UploadTest()
        {
            //https://funkmapstorage.blob.core.windows.net/test/test.png


            var file = ImageProvider.GetAvatar("beatles-avatar.jpg").ToArray();

            var fileName   = $"{Guid.NewGuid()}.png";
            var resultLink = _azureStorage.UploadFromBytesAsync(fileName, file).GetAwaiter().GetResult();

            var downloaded = _azureStorage.DownloadAsBytesAsync(resultLink).GetAwaiter().GetResult();

            Assert.AreEqual(downloaded.Length, file.Length);
        }