示例#1
0
        public async Task BlobTriggerString_Succeeds()
        {
            string fileName = Guid.NewGuid().ToString();

            //cleanup
            await StorageHelpers.ClearBlobContainers();

            //Trigger
            await StorageHelpers.UploadFileToContainer(Constants.Blob.TriggerStringContainer, fileName);

            //Verify
            string result = await StorageHelpers.DownloadFileFromContainer(Constants.Blob.OutputStringContainer, fileName);

            Assert.Equal("Hello World", result);
        }
示例#2
0
        public async Task BlobTriggerPoco_Succeeds()
        {
            string fileName = Guid.NewGuid().ToString();

            //cleanup
            await StorageHelpers.ClearBlobContainers();

            //Trigger
            var json = JsonSerializer.Serialize(new { text = "Hello World" });
            await StorageHelpers.UploadFileToContainer(Constants.Blob.TriggerPocoContainer, fileName, json);

            //Verify
            string result = await StorageHelpers.DownloadFileFromContainer(Constants.Blob.OutputPocoContainer, fileName);

            Assert.Equal(json, result);
        }