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

Verify fixtures have sources (and mention same-assembly requirement for xunit/xunit#2311) #172

Merged

Conversation

etherfield
Copy link
Contributor

Resolves 2311

@bradwilson
Copy link
Member

@etherfield Looking over this source and understanding what's going on here, it occurs to me what's really being done here: verifying that fixtures can be provided at runtime. The need for the collection definition to be in the same assembly is a related but orthogonal requirement which can be surfaced during this discovery. It occurred to me as I realized that this code needed to be updated for IClassFixture<> support what it was really doing.

Since this is about 80% of the way there, I'm going to make the pivot and adapt it to do the primary task of ensuring fixture sources are specified with the secondary task to letting people know when their fixture sources can't be found that it may be caused by the fact that their collection definition lives in another assembly.

@bradwilson bradwilson changed the title 2311 collection with no definition fix Verify fixtures have sources (and mention same-assembly requirement for xunit/xunit#2311) Dec 3, 2023
@bradwilson bradwilson merged commit f113785 into xunit:main Dec 3, 2023
5 checks passed
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.

Analyzer: Consider detecting when CollectionDefinition class is not in same assembly as test class
2 participants