public async Task QueueOutput_POJOList_Succeeds() { string expectedQueueMessage = Guid.NewGuid().ToString(); //Clear queue await StorageHelpers.ClearQueue(Constants.OutputBindingQueueNamePOJO); //Trigger Assert.True(await Utilities.InvokeHttpTrigger("QueueOutputPOJOList", $"?queueMessageId={expectedQueueMessage}", HttpStatusCode.OK, expectedQueueMessage)); //Verify IEnumerable <string> queueMessages = await StorageHelpers.ReadMessagesFromQueue(Constants.OutputBindingQueueNamePOJO); Assert.True(queueMessages.All(msg => msg.Contains(expectedQueueMessage))); }
public async Task EventHubTriggerCardinalityOne_Succeeds() { string expectedEventId = Guid.NewGuid().ToString(); try { await SetupQueue(Constants.OutputOneEventHubQueueName); // Need to setup EventHubs: test-inputOne-java and test-outputone-java await EventHubsHelpers.SendMessagesAsync(expectedEventId, Constants.InputCardinalityOneEventHubName, Constants.EventHubsConnectionStringSenderSetting); //Verify IEnumerable <string> queueMessages = await StorageHelpers.ReadMessagesFromQueue(Constants.OutputOneEventHubQueueName); Assert.True(queueMessages.All(msg => msg.Contains(expectedEventId))); } finally { //Clear queue await StorageHelpers.ClearQueue(Constants.OutputOneEventHubQueueName); } }