-
Notifications
You must be signed in to change notification settings - Fork 71
Marking soon to be removed methods in the fluent api as obsolete #362
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
Merged
alexanderlinne
merged 9 commits into
TNG:main
from
brandhuf:remove_string_overloads_from_most_fluent_methods
Apr 28, 2025
Merged
Marking soon to be removed methods in the fluent api as obsolete #362
alexanderlinne
merged 9 commits into
TNG:main
from
brandhuf:remove_string_overloads_from_most_fluent_methods
Apr 28, 2025
Conversation
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
…nt API. Instead, an IObjectProvider should be used (e.g. Types().That().HaveFullNameMatching(...)), since this allows for more flexiblity and is much clearer, what you are matching against. Added TODOs to split the methods for matching names with string into separate methods for regex and string equality. Signed-off-by: Fritz Brandhuber <[email protected]>
…oads of fluent methods were removed Signed-off-by: Fritz Brandhuber <[email protected]>
…le<IType> types), which was equal to HaveDependencyInMethodBodyTo(IEnumerable<IType> types) Signed-off-by: Fritz Brandhuber <[email protected]>
…hod parameter to change between string equality checks and regex matching by two separate methods. Removed some more redundant methods in the Fluent API with strings as arguments, that can be replaced by equivalent expressions by invoking the method with an IObjectProvider created by the fluent syntax. Signed-off-by: Fritz Brandhuber <[email protected]>
…pected test output Signed-off-by: Fritz Brandhuber <[email protected]>
Signed-off-by: Fritz Brandhuber <[email protected]>
…ark them as obsolete Signed-off-by: Fritz Brandhuber <[email protected]>
…hods # Conflicts: # ArchUnitNET/Domain/Extensions/AttributeExtensions.cs # ArchUnitNET/Domain/Extensions/DependencyExtensions.cs # ArchUnitNET/Domain/Extensions/MemberExtensions.cs # ArchUnitNET/Fluent/Syntax/Elements/Types/GivenTypesThat.cs
5473f5d
to
fbdd7f0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #362 +/- ##
==========================================
- Coverage 65.61% 57.39% -8.23%
==========================================
Files 255 255
Lines 23033 23632 +599
Branches 1961 1985 +24
==========================================
- Hits 15114 13563 -1551
- Misses 7374 9595 +2221
+ Partials 545 474 -71 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
alexanderlinne
approved these changes
Apr 25, 2025
This was referenced Jul 23, 2025
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.
Marked all methods where
useRegularExpressions
was used as a parameter to change between string equality checks and regex matching as obsolete and added separate methods to replace them (e.g.HaveName(string pattern, bool useRegularExpressions = false)
is replaced byHaveName(string name)
andHaveNameMatching(string pattern)
)Marked redundant overloads with string parameters from some methods in the Fluent API as obsolete, where an IObjectProvider can be used instead to create an equivalent or more precisely defined rule (e.g.
Types().That().DependOnAny("ExampleClass")
, which can be replaced byTypes().That().DependOnAny(Types().That().HaveName("ExampleClass"))
).Fixed a bug in the implementation of
NotHaveDependencyInMethodBodyTo(IEnumerable<IType> types)
inMethodMemberConditionsDefinition
, which resulted in the method behaving like the negationHaveDependencyInMethodBodyTo(IEnumerable<IType> types)
.