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

Recursive mocks / mock property defaults #11

Closed
dtchepak opened this issue Jul 5, 2010 · 4 comments
Closed

Recursive mocks / mock property defaults #11

dtchepak opened this issue Jul 5, 2010 · 4 comments

Comments

@dtchepak
Copy link
Member

dtchepak commented Jul 5, 2010

No description provided.

@dtchepak
Copy link
Member Author

dtchepak commented Jul 5, 2010

@dtchepak
Copy link
Member Author

dtchepak commented Jul 5, 2010

Moq's approach uses optional DefaultValue.Mock when creating mocks.

See difference between DefaultValue.Mock and recursive mocks here:

http://www.clariusconsulting.net/blogs/kzu/archive/2008/10/12/102921.aspx

@dtchepak
Copy link
Member Author

dtchepak commented Jul 9, 2010

Current proposal is to auto-sub for all substitutable getters and methods by default.

For now substitutable == interfaces. Can extend to cover classes w/ default ctors, and possibly all non-sealed classes (injecting defaults for ctors).

Also should default to non-nulls where possible: arrays, object, string?

@dtchepak
Copy link
Member Author

Done for v1.

Can look at recursive subbing for members that return classes for a future version.

This issue was closed.
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

No branches or pull requests

1 participant