-
Notifications
You must be signed in to change notification settings - Fork 0
Add CheckEquality method to IEqualizer for boolean-based equality checks #63
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: TonyTroeff <33567383+TonyTroeff@users.noreply.github.com>
TonyTroeff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look great. I added two minor suggestions.
TonyTroeff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look great. I added two minor suggestions.
Co-authored-by: TonyTroeff <33567383+TonyTroeff@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|



Pull Request Description
This PR introduces a new
CheckEqualitymethod to theIEqualizerinterface, providing a boolean-based alternative to the existing exception-basedAssertEqualityandAssertInequalitymethods. This addresses use cases where a simple true/false result is preferred over exception-based flow control.Motivation and Context
The
IEqualizerinterface previously only exposedAssertEqualityandAssertInequalitymethods, which throw exceptions on assertion failure. However, there are common scenarios where developers need to check equality without the overhead of exception handling. The newCheckEqualitymethod fills this gap by returning a boolean value (trueif equal,falseif not equal) without throwing exceptions.Changes Made
CheckEquality(object? expected, object? actual)method signature with XML documentationEqualize()internal method and returning theIsSuccessfulpropertyAssertEqualityandAssertInequality) that internally validate both the newCheckEqualitymethod and the original assertion methods, ensuring comprehensive coverage without adding redundant test casesUsage Example
The implementation reuses existing equalization logic without duplicating any comparison behavior. All existing tests now also validate that
CheckEqualityreturns the correct boolean value, providing thorough test coverage.Fixes #62
Checklist
Original prompt
CheckEqualitymethod #62✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.