Repository navigation
fix: follow the message conventions and call all caller predicates through UserCode - #387
Merged
Merged
Conversation
…like core (#386) throwing predicate, name selector, Contains* filter or custom dependency resolver aborted the evaluation instead of failing the expectation (and its negation), missing arguments surfaced as NullReferenceExceptions, argument exceptions bypassed the trace writer and used wording that differs from aweXpect.Core, and ContainsMethods ignored the cancellation of the evaluation.
…ations
A negated namespace or dependency expectation was negated twice ("does not have namespace not equal to …"), so it read as the opposite of what was checked; a mismatching name, namespace or target framework was reported as "it was …" without naming the member; and the type-relation results repeated the expectation while their Actual context bypassed the formatting settings.
When a Which, Except, WithVersion or attribute predicate of a filter, or a predicate added to the parameter or generic argument filter options, threw during the evaluation, the failure did not name the predicate as the code that threw.
vbreuss
force-pushed
the
fix/message-conventions
branch
from
October 10, 2026 08:51
993c8df to
e95263e
Compare
|
🚀 Benchmark ResultsDetails
|
👽 Mutation ResultsaweXpect.ReflectionDetails
The final mutation score is 84.70%Coverage Thresholds: high:80 low:60 break:0 |
|
This is addressed in release v3.0.0. |
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.



Some failure messages did not follow aweXpect's message conventions — two negated texts even stated the opposite of what is checked — and several predicates of the caller could still escape the evaluation.
Changes
HasNamespacereads "has namespace not equal to …" instead of the double negation "does not have namespace not equal to …", and the negatedThatAssemblies.DependOntext no longer states the opposite of the checkThatType.UnrelatedClassinstead of the full CLR name) and no longer repeat the expectation in the resultWhich,Except,WithVersion, attribute predicates, parameter and generic-argument filters) run throughUserCode.Invoke, so a throwing predicate fails the expectation ("… the predicate did throw …")