-
-
Notifications
You must be signed in to change notification settings - Fork 798
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I attach an attribute to mocked properties? #190
Comments
That's a very interesting scenario and potential new feature. Unfortunately this isn't possible right now :( |
@kzu, thank you for saying that! Since I want to refactor a test project with non-programmatic fake, I'm writing a small helper class. For completeness, I want to refactor all this fake types: I'd like to be able to define types using a fluent dot-syntax. |
I love reflection, metaprogramming, and runtime type generation stuff, so your proposition sounds interesting to me. That being said though, I am not sure Moq is quite the right place for this kind of functionality. After all, its main focus is on creating ad-hoc implementations of types having a specified behaviour. Adding or modifying custom attributes doesn't quite line up with that, IMHO. |
Hi there,
thanks for sharing this great project! 馃憤
Given that example:
I lock to attach an attribute to mocked
IScalarString::StringValue
. Is this possible?This will be very interesting also when mocking anonymous objects.
P.S.: I'm using Moq from NuGet, version 4.2.1507.0118.
The text was updated successfully, but these errors were encountered: