public void when_empty_string_set_as_id_it_should_fail()
        {
            var    configurator = new EgressApiConfigurator(new EgressApiConfiguration());
            Action sut          = () => configurator.WithId(string.Empty);

            sut.Should().Throw <ArgumentNullException>();
        }
        public void when_whitespace_string_set_as_id_it_should_fail()
        {
            var configurator = new EgressApiConfigurator(new EgressApiConfiguration());
            // ReSharper disable once AssignNullToNotNullAttribute - it's a test against null.
            Action sut = () => configurator.WithId(" \n\t");

            sut.Should().Throw <ArgumentNullException>();
        }
        public void when_id_set_it_should_be_set_in_configuration()
        {
            var          configuration = new EgressApiConfiguration();
            var          sut           = new EgressApiConfigurator(configuration);
            const string expected      = "id";

            sut.WithId(expected).Should().BeSameAs(sut);
            configuration.Id.Should().Be(expected);
        }
        public void when_id_set_more_than_once_it_should_fail()
        {
            var          configuration = new EgressApiConfiguration();
            var          configurator  = new EgressApiConfigurator(configuration);
            const string expected      = "id";
            Action       sut           = () => configurator.WithId(expected);

            sut.Should().NotThrow();
            configuration.Id.Should().Be(expected);
            EnsureSecondCallOfConfigurationMethodFails(sut);
        }