-
Notifications
You must be signed in to change notification settings - Fork 337
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
Implements parameter name check for empty guid expectation #1169
Conversation
@zvirja @ecampidoglio @moodmosaic @adamchester could you please review this pr? |
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 are great, however we should not merge them to v4. They are a breaking change, as the currently passing tests might start to fail. Even though the change is right, I would suggest to not unexpectedly distract our users on minor update.
I would apply these changes to the next major version, as I initially set in milestone of the issue.
@@ -25,18 +26,37 @@ public class EmptyGuidBehaviorExpectation : IBehaviorExpectation | |||
/// </remarks> | |||
public void Verify(IGuardClauseCommand command) | |||
{ | |||
if (command == null) throw new ArgumentNullException(nameof(command)); | |||
if (command == null) |
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.
I would not make these guard clauses multi-line. This way it clutters the code and decreases readability by distracting from an essence of the method. One liners don't suffer from the initial issue with multil-line if
statements, when you could mistakenly read statements due to poor formatting.
I do agree though that we either use one-line style without curly braces, or with curly braces if more than one line.
Thank you @zvirja! |
b8293fc
to
e9f62e4
Compare
* Implements parameter name check for empty guid expectation
…re#1169) * Implements parameter name check for empty guid expectation
…re#1169) * Implements parameter name check for empty guid expectation
…re#1169) * Implements parameter name check for empty guid expectation
This pr fixes #1009
EmptyGuidBehaviorExpectation