Exemple #1
0
        public void When_downloading_text_should_throw_an_ArgumentNullException_if_IBlobStorageClient_is_null()
        {
            IBlobStorageClient blobStorageClient = null;
            var ex = Assert.Throws <ArgumentNullException>(() => blobStorageClient.DownloadText(BlobName));

            Assert.IsNotNull(ex);
            Assert.AreEqual(ex.ParamName, "blobStorageClient");
        }
Exemple #2
0
        public static T DownloadObject <T>(this IBlobStorageClient blobStorageClient, string blobName)
            where T : class
        {
            blobStorageClient.Require("blobStorageClient");
            blobName.Require("blobName");

            return(blobStorageClient.DownloadText(blobName).FromJson <T>());
        }