示例#1
0
        public void CreateWithEmptyTopic_GetArgumentException()
        {
            var factory = new NatsConsumerFactory();

            Action act = () => { factory.Create("", new ConsumerConfig()); };

            act.Should().Throw <ArgumentNullException>();
        }
示例#2
0
        public void CreateWithNullConfig_GetArgumentException()
        {
            var factory = new NatsConsumerFactory();

            Action act = () => { factory.Create("topic", null); };

            act.Should().Throw <ArgumentNullException>();
        }
示例#3
0
        public void Create_Success()
        {
            var factory = new NatsConsumerFactory();

            var consumer = factory.Create("topic", new ConsumerConfig());

            consumer.Should().NotBeNull();
        }