You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since I want to refactor a test project with non-programmatic fake, I'm writing a small helper class.
It's nothing exceptional, something I've done in 2-3 hours of work, but I hope it could inspire a Moq enhancement.
(For now it's designed to create mock of classes with property getters/setters and attach attributes to such properties).
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: