Repository navigation
Pin constraint refusal precedence and run specs natively on xUnit v3 - #1058
Merged
Merged
Conversation
These specifications mutate state in their context and only pass when each fact gets a fresh instance, as under xUnit v2. Mark them [PerFactSpecificationLifecycle] so native xUnit v3 keeps that behavior.
Specifications 5 checks IEquatable<T> before ordered enumeration, so ShouldEqual on an ImmutableArray<T> compares by reference identity. Convert both sides with ToArray() so the specs compare contents.
These specifications move, rename or remove documents, or advance journals and continuations, and later facts in the same class read that state. xUnit v2 gave each fact a fresh instance; mark them [PerFactSpecificationLifecycle] so native xUnit v3 keeps that isolation.
Specifications 5 fails ShouldNotContain on a null string, where v2 passed. The readiness text is null when nothing is unadmitted, which is what these specs assert, so compare against an empty string instead.
Same Specifications 5 behavior as the earlier ImmutableArray fix: ShouldEqual checks IEquatable<T> before ordered enumeration, so an ImmutableArray<T> compares by reference identity. Convert the EsmSchemaV32Support lists with ToArray() so the spec compares contents.
ShouldContain now accepts a nullable string, so the ! on PendingReason in the v1 screen corpus spec is redundant and fails the Release build.
# Conflicts: # Source/DotNET/Screenplay.CanonicalVectors.Specs/for_RegisterProjectCorpus/when_comparing_the_interoperability_version_table.cs
# Conflicts: # Source/DotNET/Screenplay/Semantics/Execution/for_SemanticEvaluator/when_validating_query_concepts.cs
The apply fact mutated the shared fixture document, so under the xUnit v3 lifecycle the no-write discovery/preview assertion could observe migrated bytes. Move applying into its own context.
Contributor
Author
|
Reviewer notes
|
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changed