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

new Mock<T> can generate not unique names #348

Closed
80er opened this issue May 24, 2017 · 1 comment
Closed

new Mock<T> can generate not unique names #348

80er opened this issue May 24, 2017 · 1 comment
Assignees

Comments

@80er
Copy link
Contributor

80er commented May 24, 2017

When submitting a pull request this test failed in the first try:

https://github.com/moq/moq4/blob/master/UnitTests/MockFixture.cs#L38

After checking the code two times the same name for a mock was generated but that should be unique. Problem is this line:

https://github.com/moq/moq4/blob/master/Source/Mock.Generic.cs#L126

Although it is (more or less) guaranteed that the whole guid is unique this does not hold true for the first 4 characters. This can lead to Heisenbugs while executing tests i think. However. Not sure how much functionality is depending on having unique names for Mocks currently.

@stakx
Copy link
Contributor

stakx commented Jun 7, 2017

Done in develop. This will be solved with the next merge into master / in the next NuGet release.

@stakx stakx closed this as completed Jun 7, 2017
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 a pull request may close this issue.

3 participants