public async Task TestReadMessages() { receivedMessageCounter = 0; await queueClient.EnsureSubscribe(QueueClient_OnMessageReceived); autoResetEvent.WaitOne(30000); Assert.IsTrue(receivedMessageCounter >= minReceivedMessage); }
static async Task RegisterOnMessageHandlerAndReceiveMessages() { // Register the action that processes messages. await queueClient.EnsureSubscribe(QueueClient_OnMessageReceived); }