Add CulturedConditionalFactAttribute and CulturedConditionalTheoryAttribute to XUnitV3Extensions#16825
Conversation
Agent-Logs-Url: https://github.com/dotnet/arcade/sessions/d4c6180b-97a0-40ce-b44f-563c59ba63bd Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/arcade/sessions/0596fa58-4ded-403f-84c8-d8a179fb05c9 Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds xUnit v3 cultured conditional test attributes so tests can combine culture-specific execution with existing conditional skip evaluation.
Changes:
- Adds
CulturedConditionalFactAttribute. - Adds
CulturedConditionalTheoryAttribute. - Adds tests validating skip behavior, exposed properties, theory data passthrough, and culture selection.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Microsoft.DotNet.XUnitV3Extensions/src/CulturedConditionalFactAttribute.cs |
Adds the cultured conditional fact attribute implementation. |
src/Microsoft.DotNet.XUnitV3Extensions/src/CulturedConditionalTheoryAttribute.cs |
Adds the cultured conditional theory attribute implementation. |
src/Microsoft.DotNet.XUnitV3Extensions/tests/CulturedConditionalAttributeTests.cs |
Adds xUnit v3 tests covering the new attributes. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
I'm not sure what the purpose of these classes are, since |
|
Also, you're missing source information constructor parameters, which should be causing xUnit3003 to trigger. |
|
|
|
Agent-Logs-Url: https://github.com/dotnet/arcade/sessions/b12008fd-862a-4d58-a6f5-20cd50be2182 Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Adds conditional variants of
CulturedFactAttributeandCulturedTheoryAttributethat supportCalleeTypeandConditionMemberNames, matching the pattern of the existingConditionalFact/ConditionalTheoryattributes.These derive from
CulturedFactAttribute/CulturedTheoryAttribute(xunit v3 only) and use the existingConditionalTestDiscoverer.EvaluateSkipConditionsto setSkipat construction time. Constructors include[CallerFilePath]and[CallerLineNumber]source information parameters to avoid xUnit3003 errors.Microsoft.DotNet.XUnitV3Extensions/src/:CulturedConditionalFactAttribute— extendsCulturedFactAttributeCulturedConditionalTheoryAttribute— extendsCulturedTheoryAttributeCulturedConditionalAttributeTests.cs: skip state validation, property exposure (CalleeType,ConditionMemberNames,Cultures), theory data passthrough, culture verification viaCultureInfo.CurrentCultureTo double check: