© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#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
?
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Unit tests not appearing
C#CC# / help
3y ago
❔ .runsettings file for unit tests
C#CC# / help
3y ago