lamchakchan/RestAssured.Net

Passing httpClient

SbiCA opened this issue · 0 comments

SbiCA commented

Hi all,

Is it possible to pass a HttpClient instance to the SetupContext in order to use TestServer middleware?

Something like this:

  _testServer = new TestServer(new WebHostBuilder()
                .UseStartup<Startup>()
            _httpClient = _testServer.CreateClient();


  public void MyTest()
  {
          var test= new RestAssured()    
                .Given()               
                    .HttpClient(_httpClient)                                      

Thx