public async Task CanGetCount() { var path = MsmqUtil.GetPath(QueueName); MsmqUtil.EnsureQueueExists(path); Console.WriteLine($"Checking {path}"); var countBefore = MsmqUtil.GetCount(path); await SendMessageTo(QueueName); await SendMessageTo(QueueName); await SendMessageTo(QueueName); var countAfter = MsmqUtil.GetCount(path); Assert.That(countBefore, Is.EqualTo(0)); Assert.That(countAfter, Is.EqualTo(3)); }