title: Migration .NET Core 2.2 to 3.1 Integration test from Body always null
body: <p>I'm trying to migrate my API and integration test from .NET Core 2.2 to 3.1.
  After migration and breaching Microsoft changes adjustment considering all works fine for API prj.
  I tried it by postman.</p>
  
  <p>At this point i try to migrate my integration test project, but after the migration all http calls with [FromBody] parameters go in error because fromBody parameters are always null.</p>
  
  <p>Here some more info:</p>
  
  <p>.NET Core 2.2 code:</p>
  
  <pre><code>        IWebHostBuilder webHostBuilder = Program.CreateBuilder()
              .UseEnvironment(TestEnvironmentName.Get(inMemory: true))
              .ConfigureEntityFrameworkForTesting(fixture);
          _server = new TestServer(webHostBuilder);
  
          var client = _server.CreateClient();
          _client = new FluentClient("http://a", client);
          _client.SetHttpErrorAsException(false);
  
          _testHost = TestHostBuilder.Create()
              .ConfigureServices(services =&gt; services.AddTestServiceBus(_server.Host.Services))
              .Build();
          _testHost.Run();
  </code></pre>
  
  <p>.NET Core 3.1 code: </p>
  
  <pre><code>               var hostBuilder = new HostBuilder()
                 .ConfigureWebHostDefaults(webHost =&gt;
                 {
                     // Add TestServer
                     webHost.UseTestServer();
                     webHost.UseEnvironment(HostTestEnvironmentName.Get(inMemory: true))
                          .ConfigureEntityFrameworkForTesting(fixture)
                          .UseStartup&lt;Startup&gt;();
                 });
  
                  var host = hostBuilder.Start();
                  var client = host.GetTestClient();
  
                  _client = new FluentClient("http://a", client);
  
                  _server = host.GetTestServer();
  </code></pre>
  
  <p>I already:</p>
  
  <ul>
  <li>Check if https client used by tests contains "ContentType" as json. </li>
  <li>Trying to remove fluent client and use "System.Net.Http.HttpClient".</li>
  </ul>
  
  <p>Now my suspicious are on this message that i found when call host.GetTestServer(). But it's not a real error, it doesn't break my runtime, i just see it with quick watch on _server variable.</p>
  
  <p>Error message: "The TestServer constructor was not called with a IWebHostBuilder so IWebHost is not available." <a href="https://i.stack.imgur.com/5oBuL.png" rel="nofollow noreferrer">QuickWatchImage</a></p>
  
  <p>I'm not very sure it's related to my issue my i'm out of ideas.</p>