Windows 10 UWP should support Reflection.Emit for Mocking frameworks
The lack of Reflection.Emit in UWP significantly impacts the ability of developers to create clean, AAA-compliant unit tests in an MVVM environment (the recommended architecture for building UWP apps). With no Reflection.Emit it is impossible to build a Mocking framework for providing testable implementations of interfaces used in Dependency Injection.
Check out https://github.com/Microsoft/SimpleStubs
Take a look at:
It supports UWP.
Here's an alternative for UWP:
After 20+ yrs with Microsoft we developers continue to get screwed. First, OneDrive reduction for your office 365 subscribers, now you don't support mock frameworks ... really ??
First time I am considering leaving the MS echo system. you guys are getting worse. You want people to develop UWP but you gives half-crapped systems.
Tomas Karban commented
Oren Novotny commented
Have you looked into using DispatchProxy? https://github.com/dotnet/corefx/blob/master/src/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxy.cs
You can derive from DispatchProxy to return a mock instance of an interface at runtime.
This doesn't do everything S.R.E. can do, but it does go a long way towards mocking interfaces.
We need System.Reflection.Emit in order to use mock frameworks like Moq, FakeItEasy, NSubstitute and etc.
Jason Roberts commented
I've just release an early version of a mocking framework for Windows Phone 7: http://moqalate.codeplex.com/ http://www.dontcodetired.com/blog/post/Introducing-%28probably%29-The-Worlds-Only-Mocking-Framework-for-Windows-Phone-7-%28WP7%29.aspx
Please, please, please, please - we need mocking support. WP7 platform is such a great one to develop for except for this, especially for us long-term TDD'ers. It's such a horrible feeling (and waste of time) to have to hand-write mocks :(
Jake Ginnivan commented
Bringing the types Brendan has asked for will allow mocking frameworks to be ported to WP7 which will make the testing story MUCH nicer.
Brendan Forster commented
7.1 added some of the System.Reflection.Emit namespace from SL4, but this is not satisfactory to support libraries such as Castle DynamicProxy.
These types are necessary:
Steve Williams commented
Reflection.Emit is listed as one of the new APIs in 7.1.
OData must not be the actual requiest, since OData has been there since launch. Can you describe the problem more completely?
FYI: According to Mix11 OData support is comming with 7.5
Robert McLaws commented
The lack of Reflection.Emit in WP7 stops developers from being able to properly test their frameworks. With no Reflection.Emit it is impossible to build a Mocking framework and actually test WP7.
The lack of Reflection.Emit is also blocking the OData Client Library for WP7.