Exemple #1
0
        public void When_uploading_text_should_throw_ArgumentNullException_if_IBlobStorageClient_is_null()
        {
            IBlobStorageClient blobStorageClient = null;
            var ex = Assert.Throws <ArgumentNullException>(() => blobStorageClient.UploadText("Test", BlobName));

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

            blobStorageClient.UploadText(@object.ToJson(), blobName);
        }