示例#1
0
        public void NoHostnamesProvided()
        {
            var config = new RabbitConfiguration
            {
                Password = "******",
                Username = "******",
            };
            var service = new ExposedRabbitService(config);

            service.Invoking(y => y.ExposedFactory).Should().Throw <ArgumentNullException>();

            service.Dispose();
        }
示例#2
0
        public void NoPasswordProvided()
        {
            var config = new RabbitConfiguration
            {
                Username  = "******",
                Hostnames = new List <string> {
                    "localhost"
                }
            };
            var service = new ExposedRabbitService(config);

            service.Invoking(y => y.ExposedFactory).Should().Throw <InvalidCredentialException>();

            service.Dispose();
        }