Пример #1
0
 private void SetTestMode(OpenStackNetConfigurationOptions options)
 {
     options.FlurlHttpSettings.HttpClientFactory = new TestHttpClientFactory(this);
     options.FlurlHttpSettings.AfterCall         = call =>
     {
         CallLog.Add(call);
     };
 }
Пример #2
0
 public HttpTest()
 {
     FlurlHttp.Configure(settings => {
         settings.HttpClientFactory = new TestHttpClientFactory(this);
         settings.AfterCall         = call => CallLog.Add(call);
     });
     ResponseQueue = new Queue <HttpResponseMessage>();
     CallLog       = new List <HttpCall>();
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpTest"/> class.
 /// </summary>
 public HttpTest()
 {
     FlurlHttp.Configure(opts =>
     {
         opts.HttpClientFactory = new TestHttpClientFactory(this);
         opts.AfterCall         = call => // Restore handler which was nuked by the base HttpTest
         {
             CallLog.Add(call);
             OpenStackNet.Tracing.TraceHttpCall(call);
         };
     });
 }