public void when_null_added_as_api_it_should_fail()
        {
            var configurator = new BrokerIngressConfigurator(new BrokerIngressConfiguration());
            // ReSharper disable once AssignNullToNotNullAttribute - it's a test against null.
            Action sut = () => configurator.AddApi(configurator: null);

            sut.Should().Throw <ArgumentNullException>();
        }
        public void when_api_added_it_should_be_added_into_configuration()
        {
            var configuration = new BrokerIngressConfiguration();
            var sut           = new BrokerIngressConfigurator(configuration);
            var expected      = new StringCreator().Get(length: 10);

            sut.AddApi(api => api.WithId(expected)).Should().BeSameAs(sut);
            configuration.Apis.Should().HaveCount(expected: 1, "an API should be added")
            .And.Subject.Single().Id.Should().Be(expected, "it should be added API instance");
        }