WIP. xUnit Collection name and Collection fixture class full name tags #1430 #1833
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Namaste!
I tried to solve #1430. But because I can't build NuGet-package and run tests locally I can't validate my work. I'm very new to BDD and SpecFlow. So what I tried to accomplish:
@xunit:collection
tag is broken. The problem was collection name could be any string not just a valid identifier. I've fixed that. Now I require that tag should be in a form (note the quotes):CollectionAttribute
on a text class to make it parallelizable or not. If there is noCollectionAttribute
on a class it has a virtual one by default, every class is a separate collection.@xunit:collectionFixtureClassFullName
. Yes it's a bit long but at least self describing. The value of this tag is the full class name of a test collection fixture. I tried to use collection class full name (because collection class has it's name in the attribute and collection fixture class name in type declaration) but realized that I have no access to actual user code during code generation pass. The best user can specify is the collection fixture class full name. Usage (once again quotes are required):The class name can contain any word characters not only Latin. Please don't forget about other languages and cultures. They are and .NET allows to use those characters for valid literals.
4. Collection name and Collection fixture class full name tags are mutually exclusive. The user should one or another or non at all.
Thank you for your attention and I'm ready to discuss the change.
Types of changes
Checklist: