dotnet / dotnet/AspNetCore.Docs

total rewrite & container issue: unit test ASP.NET Core apps

Open
#15,839 18 comments 1 reaction 0 assignees View on GitHub
doc-enhancement Source - Docs.ms
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 3h
Merged PRs (30d)
97

Description

This topic:

* Has high traffic and the lowest CSAT (Customer Satisfaction) of any high traffic ASP.NET Core doc
* Is highly opinionated are far more complicated than necessary. See #15809
* Only shows controllers with views. RP and API skipped.
* Does not show how to set up unit tests
* Is far to complex

------

This is the container issue for this doc. Reopen each issue you are working on so the owner is notified.

PU issue
- [ ] Inject dummy controller? #19358
- [ ]
- [ ]

Not PU:
- [ ]
- [ ]

-------
Total rewrite outline:

* Sample app will be a `IsPrime()` code used in [Unit testing C# in .NET Core using dotnet test and xUnit](https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test). The endpoints will be implemented in Razor Pages, MVC controller with views, and Web API
* rewrite will be similar to [Unit testing C# in .NET Core using dotnet test and xUnit](https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test).
* How to set up a unit test soln (app + test project)
* Basic unit tests
* use xUnit and Moq

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: b5cce372-24e2-3489-cb19-c85d934e5d3b
* Version Independent ID: 9d12b19f-a94e-4df4-357b-3f3b93696eb6
* Content: [Test controller logic in ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/testing?view=aspnetcore-3.0)
* Content Source: [aspnetcore/mvc/controllers/testing.md](https://github.com/aspnet/AspNetCore.Docs/blob/master/aspnetcore/mvc/controllers/testing.md)
* Product: **aspnet-core**
* Technology: **aspnetcore-mvc**
* GitHub Login: @ardalis
* Microsoft Alias: **riande**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.