Skip to content

Conversation

@dennisdoomen
Copy link
Member

This PR cleans up the test code by removing unnecessary helper classes and simplifying test patterns. The main changes involved removing the Does abstract class and its implementations (DoesThrow and DoesNotThrow) that were used to create mock test subjects. Instead, the tests now use simple Action and Func<int> delegates directly with lambda expressions like () => throw new Exception() or () => { }. This eliminates the need for the .Invoking(x => x.Do()) pattern and makes the test assertions more direct and readable. Additionally, some test helper classes like SomeTestClass, ExceptionWithProperties, and ExceptionWithEmptyToString were moved to more appropriate locations within the test files.

@coveralls
Copy link

coveralls commented Sep 20, 2025

Pull Request Test Coverage Report for Build 17881830300

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.292%

Totals Coverage Status
Change from base Build 17775691023: 0.0%
Covered Lines: 12572
Relevant Lines: 12774

💛 - Coveralls

@github-actions
Copy link

github-actions bot commented Sep 20, 2025

Qodana for .NET

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@dennisdoomen dennisdoomen force-pushed the cleanup-exception-tests branch from 30a2acf to 97f8fe8 Compare September 20, 2025 15:50
@dennisdoomen dennisdoomen merged commit c84625d into fluentassertions:main Sep 20, 2025
8 checks passed
@dennisdoomen dennisdoomen deleted the cleanup-exception-tests branch September 20, 2025 16:58
This was referenced Sep 25, 2025
This was referenced Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Testing of Fluent Assertion itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants