Beispiel #1
0
        public static IOutkeepClientBuilder ConfigureServices(this IOutkeepClientBuilder builder, Action <IServiceCollection> configure)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            return(builder.ConfigureServices((context, services) => configure(services)));
        }
        public void ConfigureServicesThrowsOnNullBuilder()
        {
            // arrange
            IOutkeepClientBuilder builder = null !;

            // act
            void action()
            {
                builder.ConfigureServices(services => { });
            }

            // assert
            Assert.Throws <ArgumentNullException>(nameof(builder), action);
        }