Skip to content
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

Merged
merged 2 commits into from
Sep 4, 2020

Conversation

aivascu
Copy link
Member

@aivascu aivascu commented Feb 25, 2020

This pr fixes #1009

  • Implements parameter name check for EmptyGuidBehaviorExpectation

@aivascu aivascu requested a review from zvirja February 25, 2020 10:07
@aivascu
Copy link
Member Author

aivascu commented Mar 3, 2020

@zvirja @ecampidoglio @moodmosaic @adamchester could you please review this pr?
I'm happy to adjust it if you have any thoughts on it.

Copy link
Member

@zvirja zvirja left a 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)
Copy link
Member

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.

@aivascu aivascu added the on hold Blocked due to an usatisfied dependency or other circumstances label Jun 27, 2020
@aivascu
Copy link
Member Author

aivascu commented Jun 27, 2020

Thank you @zvirja!
I will make the changes you requested and leave the PR until we start the v5 branch.
I've assigned the on-hold label for now.

@aivascu aivascu added this to the v5.0 milestone Jul 5, 2020
@aivascu aivascu changed the base branch from master to v5 September 4, 2020 19:44
@aivascu aivascu merged commit 9c91de6 into AutoFixture:v5 Sep 4, 2020
aivascu added a commit that referenced this pull request Oct 3, 2020
* Implements parameter name check for empty guid expectation
aivascu added a commit to aivascu/AutoFixture that referenced this pull request Oct 24, 2020
…re#1169)

* Implements parameter name check for empty guid expectation
aivascu added a commit to aivascu/AutoFixture that referenced this pull request Dec 18, 2020
…re#1169)

* Implements parameter name check for empty guid expectation
aivascu added a commit to aivascu/AutoFixture that referenced this pull request Sep 5, 2021
…re#1169)

* Implements parameter name check for empty guid expectation
@aivascu aivascu deleted the features/issue-1009 branch December 5, 2023 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Blocked due to an usatisfied dependency or other circumstances
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EmptyGuidBehaviorExpectation should verify the parameter name
2 participants