Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V9 Move sln files to root #11212

Merged
merged 5 commits into from
Sep 29, 2021
Merged

V9 Move sln files to root #11212

merged 5 commits into from
Sep 29, 2021

Conversation

p-m-j
Copy link
Contributor

@p-m-j p-m-j commented Sep 28, 2021

No description provided.

@p-m-j p-m-j marked this pull request as draft September 28, 2021 07:42
@p-m-j
Copy link
Contributor Author

p-m-j commented Sep 28, 2021

The WebApplicationFactory constructor infers the app content root path by searching for a WebApplicationFactoryContentRootAttribute on the assembly containing the integration tests with a key equal to the TEntryPoint assembly System.Reflection.Assembly.FullName. In case an attribute with the correct key isn't found, WebApplicationFactory falls back to searching for a solution file (.sln) and appends the TEntryPoint assembly name to the solution directory. The app root directory (the content root path) is used to discover views and content files.

https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-5.0&viewFallbackFrom=aspnetcore-2.2#how-the-test-infrastructure-infers-the-app-content-root-path-1

@p-m-j p-m-j marked this pull request as ready for review September 28, 2021 16:12
@p-m-j p-m-j merged commit bceebea into v9/dev Sep 29, 2021
@p-m-j p-m-j deleted the v9/misc/move-sln-files-to-root branch September 29, 2021 10:51
JoseMarcenaro pushed a commit to JoseMarcenaro/Umbraco-CMS that referenced this pull request Oct 7, 2021
* Move sln files to root

* Fix tests

* Misc cleanup - remove unused helper

* Document the esoteric nature of UmbracoWebApplicationFactory

* Avoid unnecessary change to TestHelper WorkingDirectory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant