public void CheckAsync_OK_Test() { var checker = new RabbitMQHealthChecker("MQ", new ConnectionFactory()); //use localhost:5672: guest guest var r = checker.CheckAsync().Result; Assert.IsNull(r); }
public void CheckAsync_Dead_Test() { ConnectionFactory connectionFactory = new ConnectionFactory { HostName = "", Port = 123 }; var checker = new RabbitMQHealthChecker("MQ", connectionFactory); Assert.ThrowsException <AggregateException>(() => checker.CheckAsync().Result); }