© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
13mo ago
•
14 replies
surwren
✅ Structuring Unit Tests
I am following the sample from
(
https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-9.0
) namely
(
https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/test/integration-tests/8.x/IntegrationTestsSample
)
I have loaded all
.csproj files in MSVS with right click
-
> add
, then did Test
-
> Run All Tests
The tests run successfully
, but I am confused about whether it is necessary to structure my own unit tests this way
(folderwise
?
)
It seems there are 3
.csproj files altogether
- RazorPagesProject
.csproj
- RazorPagesProject
.Tests
.csproj
- RazorPagesProject
.Tests
.csproj
(separate folder
)
Do I need to use a separate folder for the tests
? Why are there 2 versions of
RazorPagesProject.Tests.csproj
RazorPagesProject.Tests.csproj
?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
✅ Unit tests not appearing
C
C# / help
3y ago
❔ .runsettings file for unit tests
C
C# / help
3y ago