Skip to content

Conversation

@Keboo
Copy link
Collaborator

@Keboo Keboo commented Feb 20, 2022

This is a proposed fix for #134 (more overloads would need to be created if this is deemed an acceptable fix).

First this adds an additional overload for CreateSelfMock to allow for setting CallBase and MockBehavior.

Second this adds an additional "WithSelfMock" method that creates a self mock and also registers it so that it can be referenced with subsequent Setup calls. This is inline with the existing "With" methods that call CreateInstance and register the created instance.

@Keboo Keboo requested a review from adamhewitt627 February 20, 2022 06:03
@Keboo
Copy link
Collaborator Author

Keboo commented Feb 20, 2022

@ascott18 feedback on this?

@ascott18
Copy link
Contributor

@Keboo That looks like it should do the trick. Thanks!

@Keboo Keboo marked this pull request as ready for review February 21, 2022 03:48
@adamhewitt627 adamhewitt627 merged commit 2d3b6f9 into moq:master Feb 21, 2022
@Keboo Keboo deleted the fix134 branch February 21, 2022 04:49
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.

3 participants