Aspnetcore.docs: Document unit testing with IHttpClientFactory

Created on 27 Jul 2018  路  8Comments  路  Source: dotnet/AspNetCore.Docs

There's a partial example at https://github.com/aspnet/HttpClientFactory/wiki/Consumption-Patterns#unit-testing. This content needs to be added to Docs.

See the xUnit & Moq sample at https://github.com/glennc/httpclientfactorysample/tree/master/test/WebUI.Tests.

P1 P2 doc-bug

All 8 comments

@jphellemons Thanks for pointing this out. All of the content on that Wiki page, except for the unit testing, was moved to Docs.

@scottaddie the unit testing part was exactly what I was looking for.

@jphellemons Here's a screenshot of what that Wiki page used to contain for unit testing:

image

See also the link above to the xUnit & Moq sample.

@guardrex please suggest a doc this issue should be attached to.

@Rick-Anderson Perhaps none because we only keep two unit tests topics (Razor Pages tests & Test controllers), and this doesn't look like it fits neatly into either of them. I think Scott's plan was to make a new topic for this under the Test, debug, and troubleshoot node.

This should be a new topic.

@scottaddie we don't have the resources to maintain our current testing docs, so I'm closing this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

royshouvik picture royshouvik  路  3Comments

Rick-Anderson picture Rick-Anderson  路  3Comments

AnthonyMastrean picture AnthonyMastrean  路  3Comments

madelson picture madelson  路  3Comments

aaron-bozit picture aaron-bozit  路  3Comments