Exemplo n.º 1
0
        public void GivenBusInitializerOptionsWhenSetInvalidSerializerTypeShouldThrow()
        {
            var builder = new BusInitializerOptionsBuilder(new ConfigurationBuilder().Build());

            Action action = () => builder
                            .SetSerializer <AbstractSerializerStub>()
                            .Build();

            action.Should().Throw <ArgumentException>();
        }
Exemplo n.º 2
0
        public void GivenBusInitializerOptionsWhenNotSetConnectionStringShouldThrow()
        {
            var builder = new BusInitializerOptionsBuilder(new ConfigurationBuilder().Build());

            Action action = () => builder
                            .SetSerializer <BusSerializerStub>()
                            .Build();

            action.Should().Throw <ArgumentNullException>();
        }