Skip to content

Conversation

alexanderlinne
Copy link
Collaborator

  • Add interface ISizedObjectProvider and implementations for lists of types to be able to remove duplicate code without losing improved error messages for cases where the input objects are know to be an empty list.
  • Remove overloads using params or IEnumerable in ObjectConditionsDefinition.cs. Callees in ObjectsShould.cs instead use the new implemenations of IObjectProvider.
  • Tests: add an AssertException overload

Breaking Changes:

  • Some fluent syntax conditions explicitly catch'ed and ignored exceptions when types were not found within the given architecture. Those exceptions are no longer catch'ed. Users are expected to only provide types that exist within the given architecture.

Signed-off-by: Alexander Linne <alexander.linne@tngtech.com>
@alexanderlinne alexanderlinne force-pushed the chore/reduce-code-duplication branch from 2f4e5ea to 9688fd8 Compare April 28, 2025 15:52
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 77.73723% with 61 lines in your changes missing coverage. Please review.

Project coverage is 55.74%. Comparing base (533d9b0) to head (9688fd8).

Files with missing lines Patch % Lines
...uent/Syntax/Elements/ObjectConditionsDefinition.cs 62.16% 28 Missing ⚠️
ArchUnitNET/Fluent/SystemTypeListObjectProvider.cs 50.00% 17 Missing and 1 partial ⚠️
ArchUnitNET/Fluent/ListObjectProvider.cs 40.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #367      +/-   ##
==========================================
- Coverage   57.39%   55.74%   -1.65%     
==========================================
  Files         255      257       +2     
  Lines       23632    23038     -594     
  Branches     1985     1897      -88     
==========================================
- Hits        13563    12842     -721     
- Misses       9595     9740     +145     
+ Partials      474      456      -18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexanderlinne alexanderlinne changed the title Reduce Code Duplication in Fluent Syntax Conditions Reduce Code Duplication in Fluent Syntax Object Conditions Apr 29, 2025
@alexanderlinne alexanderlinne merged commit 445f19f into main Apr 30, 2025
9 checks passed
@alexanderlinne alexanderlinne deleted the chore/reduce-code-duplication branch April 30, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants