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
evoskuil[CodePlex] It appears that there is no way to register mappings without providing a reference to the static MapperRegistry. While a static wrapper around non-static registration, as a helper, would be fine, the requirement for static registration is problematic - even if the implementation is actually thread safe. When unit testing static state in general is bad as it spans individual tests, corrupting those tests. Additionally, while the self-test method on AutoMapper is cool, it is also a static method (which in turn relies on static registration). This is also bad in that unit tests executing concurrently are sharing state, and thread safety doesn't resolve the resulting cross-test corruption. It would be *much* better for AutoMapper to be fully non-static apart from optional helpers.
The text was updated successfully, but these errors were encountered:
evoskuil[CodePlex]
It appears that there is no way to register mappings without providing a reference to the static MapperRegistry. While a static wrapper around non-static registration, as a helper, would be fine, the requirement for static registration is problematic - even if the implementation is actually thread safe. When unit testing static state in general is bad as it spans individual tests, corrupting those tests. Additionally, while the self-test method on AutoMapper is cool, it is also a static method (which in turn relies on static registration). This is also bad in that unit tests executing concurrently are sharing state, and thread safety doesn't resolve the resulting cross-test corruption. It would be *much* better for AutoMapper to be fully non-static apart from optional helpers.
The text was updated successfully, but these errors were encountered: