コード例 #1
0
        public void ConfigureMethod()
        {
            // preparation
            var startup            = new Covid19Radar.Background.Startup();
            var builder            = new Mock <IFunctionsHostBuilder>();
            var services           = new Mock <Microsoft.Extensions.DependencyInjection.IServiceCollection>();
            var serviceDescriptors = new Mock <IEnumerator <ServiceDescriptor> >();

            services.Setup(_ => _.Add(It.IsAny <ServiceDescriptor>()));
            services.Setup(_ => _.GetEnumerator()).Returns(serviceDescriptors.Object);
            builder.Setup(_ => _.Services)
            .Returns(services.Object);

            // action
            startup.Configure(builder.Object);
            // assert
        }
コード例 #2
0
 public void CreateMethod()
 {
     // preparation
     var startup = new Covid19Radar.Background.Startup();
 }