Answered by:
Shims Vs Stubs

Question
-
Can anybody tell me when can we use shims and stubs, its implementation, why to use them and its limitations over SharePoint 2013. I went through this link https://msdn.microsoft.com/en-us/library/hh549175.aspx . I understood some of the things but not completely. Please guide me in this.Wednesday, July 22, 2015 12:23 PM
Answers
-
I would spend some time learning to unit test on a non-SharePoint project first, otherwise you will probably find yourself getting frustrated with the process.
but the long and short, in an extremely generalized view: shims are for functions (like overriding DateTime.Now), stubs are for implementations (interfaces, abstract classes).
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs- Marked as answer by Dennis Guo Thursday, August 6, 2015 9:43 AM
Wednesday, July 22, 2015 2:52 PM -
Hi,
From your description, my understanding is that you get have doubt about Shims and stubs.
Shims and stubs are part of the new Microsoft Fakes Framework. You could find how to implement these two method from this article:
http://blog.nwcadence.com/shims-and-stubs-and-the-microsoft-fakes-framework/
For more information:
Best Regards,
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.- Marked as answer by Dennis Guo Thursday, August 6, 2015 9:44 AM
Thursday, July 23, 2015 6:45 AM
All replies
-
I would spend some time learning to unit test on a non-SharePoint project first, otherwise you will probably find yourself getting frustrated with the process.
but the long and short, in an extremely generalized view: shims are for functions (like overriding DateTime.Now), stubs are for implementations (interfaces, abstract classes).
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs- Marked as answer by Dennis Guo Thursday, August 6, 2015 9:43 AM
Wednesday, July 22, 2015 2:52 PM -
Hi,
From your description, my understanding is that you get have doubt about Shims and stubs.
Shims and stubs are part of the new Microsoft Fakes Framework. You could find how to implement these two method from this article:
http://blog.nwcadence.com/shims-and-stubs-and-the-microsoft-fakes-framework/
For more information:
Best Regards,
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.- Marked as answer by Dennis Guo Thursday, August 6, 2015 9:44 AM
Thursday, July 23, 2015 6:45 AM