Exemplo n.º 1
0
        public void Configuration(IAppBuilder appBuilder)
        {
            var config = new HttpConfiguration()
                         .ConfigIoC()
                         .ConfigSwagger()
                         .ConfigWebApi();

            appBuilder
            .ConfigureLogging(AppSettingsProvider.Build <LoggingConfiguration>())
            .UseCors(AppSettingsProvider.Build <CorsConfiguration>())
            .UseWebApi(config);
        }
Exemplo n.º 2
0
        public void Should_bind_to_configuration()
        {
            var settings = AppSettingsProvider.Build <LoggingConfiguration>();

            settings.DefaultOutput.Should().Be("template");
        }