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

VerityMocks and VerifyAllMocks Static Helper Methods #238

Merged
merged 2 commits into from
May 25, 2016
Merged

VerityMocks and VerifyAllMocks Static Helper Methods #238

merged 2 commits into from
May 25, 2016

Conversation

RehanSaeed
Copy link
Contributor

I tend to write a method that does multiple verifications a lot, it saves a few lines:

mock1.VerifyAll();
mock2.VerifyAll();
mock3.VerifyAll();

// Versus

Mock.VerifyAll(mock1, mock2, mock3);

I tend to write the methods below a lot, it saves a few lines:

```
mock1.VerifyAll();
mock2.VerifyAll();
mock3.VerifyAll();
// Versus
Mock.VerifyAll(mock1, mock2, mock3);
```
@@ -121,6 +121,24 @@ protected Mock()

throw new ArgumentException(Resources.ObjectInstanceNotMock, "mocked");
}

/// <include file='Mock.xdoc' path='docs/doc[@for="Mock.VerifyMocks"]/*'/>
public static void VerifyMocks(params Mock[] mocks)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I like the original proposal naming better: Verify(mocks)

@kzu
Copy link
Member

kzu commented May 25, 2016

If these two get renamed to Verify and VerifyAll, I'll merge it ;)

Renamed back to original names
@RehanSaeed
Copy link
Contributor Author

@kzu Methods renamed.

@kzu kzu merged commit 1c76524 into devlooped:master May 25, 2016
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.

None yet

2 participants