DataServiceCollection Mock/Stub support
Allow for the mocking / stubbing of the DataServiceCollection and context. All the constructors are internal. It would be nice if they all had interfaces that could be easily stubbed out.
Niraj Jain commented
Definitely Interface implementation is required for DataServiceContext and DataServiceQuery as without this it is very difficult to test the service implementation with client. I spend so much time using some mock frameworks but was unable to do so.
Or please proved some code snippet if the developer can create interface themselves and use it for testing purpose.
An interface to all functions provided by DataServiceQuery (and DataServiceContext) is necessary to write testable applications.
Edwin Klesman commented
make it so, we really would love to be able to test our controllers that interact with webservices using mocks for dataservicecollection
Dave Grundgeiger commented
Being able to mock for unit testing should be a design requirement in all APIs.
Aaron McPherson commented
Please implement this. Would be very helpful in testing client apps.
Kirill Selyak commented
It has to be done!
This is a great idea! I am really surprised Microsoft has not already started working on it.