public async Task CallExpectedMethod() { var client = new WebApplicationFactory <Startup>().CreateClient(); var response = await client.PatchJsonAsync("comments", new CommentCandidate { Result = "any" }); Assert.AreEqual("PATCH", (await response.Content.ReadJsonAsync <Comment>()).From); }