コード例 #1
0
        public void RunLambdaStartupShouldCallConfigureLoggingOnStartup(
            ServiceCollection serviceCollection,
            [Substitute] ILambdaStartup startup
            )
        {
            serviceCollection.AddSingleton(startup);

            var provider = serviceCollection.BuildServiceProvider();

            TestLambdaHostBuilder.RunLambdaStartup(provider, serviceCollection);

            startup.Received().ConfigureLogging(Arg.Any <ILoggingBuilder>());
        }
コード例 #2
0
        public void RunLambdaStartupShouldAddServiceCollection(
            ServiceCollection serviceCollection,
            [Substitute] ILambdaStartup startup
            )
        {
            serviceCollection.AddSingleton(startup);

            var provider = serviceCollection.BuildServiceProvider();

            TestLambdaHostBuilder.RunLambdaStartup(provider, serviceCollection);

            startup.Received().ConfigureServices(Arg.Is(serviceCollection));
        }