public void Setup() { var log = LogManager.GetLogger("logger"); var container = new WindsorContainer(); container.Register(Component.For <ILog>().Instance(log)); container.AddHttpClient(c => { c.Add <CommonLoggingMiddelware>(); c.Add <SerilogMiddelware>(); c.Add <CircuitBreakerMiddelware>(); c.Add <TimeoutMiddelware>(); c.Add <OnConditionRetryMiddelware>(); }); _sut = container.GetHttpClient(); Log.Logger = new LoggerConfiguration() .WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}{Properties}").MinimumLevel.Verbose() .CreateLogger(); }
public void Setup() { var container = new WindsorContainer(); container.AddHttpClient(); _sut = container.Resolve <IHttpHandler>(); }